Changeset 40604


Ignore:
Timestamp:
2014-04-30T17:52:30+02:00 (4 years ago)
Author:
cyrus
Message:

odhcp6c: add preliminary support for MAP provisioning

Location:
trunk/package/network/ipv6/odhcp6c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/ipv6/odhcp6c/Makefile

    r40432 r40604  
    99 
    1010PKG_NAME:=odhcp6c 
    11 PKG_VERSION:=2014-04-09 
     11PKG_VERSION:=2014-04-30 
    1212PKG_RELEASE=$(PKG_SOURCE_VERSION) 
    1313 
     
    1616PKG_SOURCE_URL:=git://github.com/sbyx/odhcp6c.git 
    1717PKG_SOURCE_PROTO:=git 
    18 PKG_SOURCE_VERSION:=6bbd2b0208fc17b6566595bfdfef2ff1d012d143 
     18PKG_SOURCE_VERSION:=a0bbaf5bffc66b1693577a374a9a599e313aefe1 
    1919PKG_MAINTAINER:=Steven Barth <steven@midlink.org> 
    2020 
     
    2828ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_cer_id),0) 
    2929  CMAKE_OPTIONS += -DEXT_CER_ID=$(CONFIG_PACKAGE_odhcp6c_ext_cer_id) 
     30endif 
     31 
     32ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_s46),0) 
     33  CMAKE_OPTIONS += -DEXT_S46=$(CONFIG_PACKAGE_odhcp6c_ext_s46) 
    3034endif 
    3135 
     
    4751    depends on PACKAGE_odhcp6c 
    4852    default 0 
     53 
     54  config PACKAGE_odhcp6c_ext_s46 
     55    int "Softwire MAP Extension ID (0 = disabled)" 
     56    depends on PACKAGE_odhcp6c 
     57    default 0 
    4958endef 
    5059 
  • trunk/package/network/ipv6/odhcp6c/files/dhcpv6.script

    r40351 r40604  
    9595        fi 
    9696 
     97        MAPTYPE="" 
     98        MAPRULE="" 
     99 
     100        if [ -n "$MAPE" ]; then 
     101                MAPTYPE="map-e" 
     102                MAPRULE="$MAPE" 
     103        elif [ -n "$MAPT" ]; then 
     104                MAPTYPE="map-t" 
     105                MAPRULE="$MAPT" 
     106        elif [ -n "$LW4O6" ]; then 
     107                MAPTYPE="lw4o6" 
     108                MAPRULE="$LW4O6" 
     109        fi 
     110 
     111        if [ -n "$IFACE_MAP" -a -n "$MAPTYPE" -a -n "$MAPRULE" ]; then 
     112                json_init 
     113                json_add_string name "$IFACE_MAP" 
     114                json_add_string ifname "@$INTERFACE" 
     115                json_add_string proto map 
     116                json_add_string type "$MAPTYPE" 
     117                json_add_string rule "$MAPRULE" 
     118                [ -n "$ZONE_MAP" ] && json_add_string zone "$ZONE_MAP" 
     119                [ -n "$IFACE_MAP_DELEGATE" ] && json_add_boolean delegate "$IFACE_MAP_DELEGATE" 
     120                json_close_object 
     121                ubus call network add_dynamic "$(json_dump)" 
     122        fi 
     123 
    97124        # TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN 
    98125} 
  • trunk/package/network/ipv6/odhcp6c/files/dhcpv6.sh

    r40386 r40604  
    1818        proto_config_add_string iface_dslite 
    1919        proto_config_add_string zone_dslite 
     20        proto_config_add_string iface_map 
     21        proto_config_add_string zone_map 
    2022        proto_config_add_string 'ifaceid:ip6addr' 
    2123        proto_config_add_string 'sourcerouting:bool' 
     
    2931        local iface="$2" 
    3032 
    31         local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate zone_dslite 
    32         json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting userclass vendorclass delegate zone_dslite 
     33        local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map ifaceid sourcerouting userclass vendorclass delegate zone_dslite zone_map 
     34        json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map ifaceid sourcerouting userclass vendorclass delegate zone_dslite zone_map 
    3335 
    3436 
     
    6062        [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix" 
    6163        [ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite" 
     64        [ -n "$iface_map" ] && proto_export "IFACE_MAP=$iface_map" 
    6265        [ "$sourcerouting" != "0" ] && proto_export "SOURCE_ROUTING=1" 
    6366        [ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0" 
     67        [ "$delegate" = "0" ] && proto_export "IFACE_MAP_DELEGATE=0" 
    6468        [ -n "$zone_dslite" ] && proto_export "ZONE_DSLITE=$zone_dslite" 
     69        [ -n "$zone_map" ] && proto_export "ZONE_MAP=$zone_map" 
    6570 
    6671        proto_export "INTERFACE=$config" 
Note: See TracChangeset for help on using the changeset viewer.