diff --git a/net/chrony/Makefile b/net/chrony/Makefile index 7ce3ec330..dc7b5ad0e 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2009 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=chrony PKG_VERSION:=1.26 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= ftp://download.tuxfamily.org/projects/chrony/ \ diff --git a/net/chrony/files/ntpd.init b/net/chrony/files/ntpd.init index dae0184da..6e742faf3 100644 --- a/net/chrony/files/ntpd.init +++ b/net/chrony/files/ntpd.init @@ -15,8 +15,8 @@ start() { config_get NTP_SERVERS $CONFIG_SECTION TimeServers config_get CLIENT_NETWORKS $CONFIG_SECTION ClientAccessFrom CHRONY_KEY=$(awk '/^1 / { print $2; }' /etc/chrony/chrony.keys) - include /lib/network - scan_interfaces + + . /lib/functions/network.sh # Define servers and do a rapid series of time measurements # to get up to date @@ -35,18 +35,9 @@ start() { echo password $CHRONY_KEY echo makestep for NETNAME in $CLIENT_NETWORKS; do - local INTERFACE - local IP - local NETMASK - local BROADCAST - local NETWORK - local PREFIX - - config_get INTERFACE "$NETNAME" ifname - if [ -n "$INTERFACE" ] ; then - eval $(ifconfig $INTERFACE | grep inet | sed -e 's/.*addr:/IP=/' -e 's/ .*Mask:/; NETMASK=/') - eval $(ipcalc.sh $IP $NETMASK) - echo allow $NETWORK/$PREFIX + local subnet + if network_get_subnet subnet "$NETNAME"; then + echo allow $subnet fi done ) | chronyc > /dev/null 2>&1