Author: cyrus Date: 2015-05-02 09:44:55 +0200 (Sat, 02 May 2015) New Revision: 45594
Modified: trunk/package/network/config/netifd/Makefile trunk/package/network/config/netifd/files/lib/netifd/dhcp.script trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh Log: dhcp: add option specifying overriding custom-routes Signed-off-by: Steven Barth <[email protected]> Modified: trunk/package/network/config/netifd/Makefile =================================================================== --- trunk/package/network/config/netifd/Makefile 2015-05-02 07:44:47 UTC (rev 45593) +++ trunk/package/network/config/netifd/Makefile 2015-05-02 07:44:55 UTC (rev 45594) @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_VERSION:=2015-04-21 +PKG_VERSION:=2015-05-02 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE_PROTO:=git Modified: trunk/package/network/config/netifd/files/lib/netifd/dhcp.script =================================================================== --- trunk/package/network/config/netifd/files/lib/netifd/dhcp.script 2015-05-02 07:44:47 UTC (rev 45593) +++ trunk/package/network/config/netifd/files/lib/netifd/dhcp.script 2015-05-02 07:44:55 UTC (rev 45594) @@ -21,6 +21,10 @@ for i in $router; do proto_add_ipv4_route "$i" 32 "" "$ip" proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" + + for r in $CUSTOMROUTES; do + proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip" + done done # CIDR STATIC ROUTES (rfc3442) Modified: trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh =================================================================== --- trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh 2015-05-02 07:44:47 UTC (rev 45593) +++ trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh 2015-05-02 07:44:55 UTC (rev 45594) @@ -19,14 +19,15 @@ proto_config_add_string zone6rd proto_config_add_string zone proto_config_add_string mtu6rd + proto_config_add_string customroutes } proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd + local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes + json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes local opt dhcpopts for opt in $reqopts; do @@ -44,6 +45,7 @@ [ -n "$zone6rd" ] && proto_export "ZONE6RD=$zone6rd" [ -n "$zone" ] && proto_export "ZONE=$zone" [ -n "$mtu6rd" ] && proto_export "MTU6RD=$mtu6rd" + [ -n "$customroutes" ] && proto_export "CUSTOMROUTES=$customroutes" [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0" proto_export "INTERFACE=$config" _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
