chiark
/
gitweb
/
~mdw
/
firewall
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8bd7e0f
)
functions.m4 (ntpclient): Handle NTP servers with IPv6 addresses.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 11 May 2015 14:17:32 +0000
(15:17 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 11 May 2015 14:22:43 +0000
(15:22 +0100)
functions.m4
patch
|
blob
|
blame
|
history
diff --git
a/functions.m4
b/functions.m4
index c8a08c449d780759b494ee9e025470563063c564..765a94df21c1fea2be5068c64162c30b6c9788f0 100644
(file)
--- a/
functions.m4
+++ b/
functions.m4
@@
-301,8
+301,11
@@
ntpclient () {
ntpchain=$1; shift
clearchain ntp-servers
ntpchain=$1; shift
clearchain ntp-servers
- for ntp; do run iptables -A ntp-servers -j ACCEPT -s $ntp; done
- run iptables -A $ntpchain -j ntp-servers \
+ for ntp; do
+ case $ntp in *:*) ipt=ip6tables ;; *) ipt=iptables ;; esac
+ run $ipt -A ntp-servers -j ACCEPT -s $ntp;
+ done
+ run ip46tables -A $ntpchain -j ntp-servers \
-p udp --source-port 123 --destination-port 123
}
-p udp --source-port 123 --destination-port 123
}