sep_spc . store word ]
| [ sep_spc . key (/autokey|burst|iburst|noselect|preempt/ |
/prefer|true|dynamic/) ] in
- let cmd = /server|peer|broadcast|manycastclient/
+ let cmd = /pool|server|peer|broadcast|manycastclient/
| /multicastclient|manycastserver/ in
record cmd opt*
kv "broadcastdelay" Rx.decimal
| flags
| simple_setting /driftfile|leapfile|logfile|includefile/
- | simple_setting "statsdir"
+ | simple_setting "statsdir"
+ | simple_setting "ntpsigndsocket"
(* Misc commands, see miscopt.html in ntp docs *)
(* Define restrict *)
let restrict_record =
- let action = [ label "action" . sep_spc . store word ] in
- [ key "restrict" . sep_spc .
- [ label "ipv6" . Util.del_str "-6" . sep_spc ]? .
- store (word - "-6") . action* . eol ]
+ let ip6_restrict = [ label "ipv6" . sep_spc . Util.del_str "-6" ] in
+ let ip4_restrict = [ label "ipv4" . sep_spc . Util.del_str "-4" ] in
+ let action = [ label "action" . sep_spc . store /[^,# \n\t-][^,# \n\t]*/ ] in
+ [ key "restrict" . (ip6_restrict | ip4_restrict)? . sep_spc . store /[^,# \n\t-][^,# \n\t]*/ . action* . eol ]
(* Define statistics *)
let statistics_flag (kw:string) = [ sep_spc . key kw ]
let arg = [ key arg_names . sep_spc . store Rx.decimal ] in
[ key "tos" . (sep_spc . arg)* . eol ]
+ let interface =
+ let action = [ label "action" . store /listen|ignore|drop/ ]
+ in let addresses = [ label "addresses" . store Rx.word ]
+ in [ key "interface" . sep_spc . action . sep_spc . addresses . eol ]
+
(* Define lens *)
let lns = ( comment | empty | command_record | fudge_record
| restrict_record | simple_settings | statistics_record
| filegen_record | broadcastclient
- | auth_command | tinker | tos)*
+ | auth_command | tinker | tos | interface)*
let filter = (incl "/etc/ntp.conf")