Changeset 45594


Ignore:
Timestamp:
2015-05-02T09:44:55+02:00 (3 years ago)
Author:
cyrus
Message:

dhcp: add option specifying overriding custom-routes

Signed-off-by: Steven Barth <steven@…>

Location:
trunk/package/network/config/netifd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/config/netifd/Makefile

    r45550 r45594  
    22 
    33PKG_NAME:=netifd 
    4 PKG_VERSION:=2015-04-21 
     4PKG_VERSION:=2015-05-02 
    55PKG_RELEASE=$(PKG_SOURCE_VERSION) 
    66 
  • trunk/package/network/config/netifd/files/lib/netifd/dhcp.script

    r45476 r45594  
    2222                proto_add_ipv4_route "$i" 32 "" "$ip" 
    2323                proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" 
     24 
     25                for r in $CUSTOMROUTES; do 
     26                        proto_add_ipv4_route "${r%%/*}" "${r##*/}" "$i" "$ip" 
     27                done 
    2428        done 
    2529 
  • trunk/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh

    r43214 r45594  
    2020        proto_config_add_string zone 
    2121        proto_config_add_string mtu6rd 
     22        proto_config_add_string customroutes 
    2223} 
    2324 
     
    2627        local iface="$2" 
    2728 
    28         local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd 
    29         json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd 
     29        local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
     30        json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes 
    3031 
    3132        local opt dhcpopts 
     
    4546        [ -n "$zone" ] && proto_export "ZONE=$zone" 
    4647        [ -n "$mtu6rd" ] && proto_export "MTU6RD=$mtu6rd" 
     48        [ -n "$customroutes" ] && proto_export "CUSTOMROUTES=$customroutes" 
    4749        [ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0" 
    4850 
Note: See TracChangeset for help on using the changeset viewer.