Changeset 26737


Ignore:
Timestamp:
2011-04-20T04:56:17+02:00 (7 years ago)
Author:
nbd
Message:

busybox: fix issues with static routes and 6rd option parsing (thx, Florian Fuessl)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/busybox/patches/244-udhcpc_add_6rd_option.patch

    r26455 r26737  
    1 diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c 
    2 index 0a60261..eaf2b4b 100644 
    31--- a/networking/udhcp/common.c 
    42+++ b/networking/udhcp/common.c 
    5 @@ -56,6 +56,8 @@ const struct dhcp_optflag dhcp_optflags[] = { 
     3@@ -56,6 +56,8 @@ const struct dhcp_optflag dhcp_optflags[ 
    64 #endif 
    75        { OPTION_STATIC_ROUTES                    , 0x79 }, /* DHCP_STATIC_ROUTES */ 
     
    1210  
    1311        /* Options below have no match in dhcp_option_strings[], 
    14 @@ -118,6 +120,8 @@ const char dhcp_option_strings[] ALIGN1 = 
    15  // doesn't work in udhcpd.conf since OPTION_STATIC_ROUTES 
     12@@ -119,6 +121,8 @@ const char dhcp_option_strings[] ALIGN1  
    1613 // is not handled yet by "string->option" conversion code: 
    1714        "staticroutes" "\0"/* DHCP_STATIC_ROUTES  */ 
     15        "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */ 
    1816+       "ip6rd" "\0"       /* DHCP_6RD (RFC)      */ 
    1917+       "ip6rd" "\0"       /* DHCP_6RD (Comcast)  */ 
    20         "msstaticroutes""\0"/* DHCP_MS_STATIC_ROUTES */ 
    2118        "wpad" "\0"        /* DHCP_WPAD           */ 
    2219        ; 
    23 @@ -146,6 +150,7 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = { 
     20  
     21@@ -146,6 +150,7 @@ const uint8_t dhcp_option_lengths[] ALIG 
    2422        [OPTION_S32] =     4, 
    2523        /* Just like OPTION_STRING, we use minimum length here */ 
     
    2927  
    3028  
    31 diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h 
    32 index f8f18ff..56cd8b0 100644 
    3329--- a/networking/udhcp/common.h 
    3430+++ b/networking/udhcp/common.h 
     
    4137        OPTION_DNS_STRING,  /* RFC1035 compressed domain name list */ 
    4238        OPTION_SIP_SERVERS, 
    43 diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c 
    44 index 78aabed..993326f 100644 
    4539--- a/networking/udhcp/dhcpc.c 
    4640+++ b/networking/udhcp/dhcpc.c 
    47 @@ -45,6 +45,7 @@ static const uint8_t len_of_option_as_string[] = { 
     41@@ -45,6 +45,7 @@ static const uint8_t len_of_option_as_st 
    4842        [OPTION_IP              ] = sizeof("255.255.255.255 "), 
    4943        [OPTION_IP_PAIR         ] = sizeof("255.255.255.255 ") * 2, 
     
    5347 #if ENABLE_FEATURE_UDHCP_RFC3397 
    5448        [OPTION_DNS_STRING      ] = 1, /* unused */ 
    55 @@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const char *pre, const uint8_t *ip) 
     49@@ -68,6 +69,23 @@ static int sprint_nip(char *dest, const  
    5650        return sprintf(dest, "%s%u.%u.%u.%u", pre, ip[0], ip[1], ip[2], ip[3]); 
    5751 } 
     
    7771 static int mton(uint32_t mask) 
    7872 { 
    79 @@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_ 
     73@@ -177,6 +195,70 @@ static NOINLINE char *xmalloc_optname_op 
    8074  
    8175                        return ret; 
Note: See TracChangeset for help on using the changeset viewer.