diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-23 15:43:08 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-23 15:43:08 +0100 |
commit | 37a658c4c86fa5ad9fb6f76cba2fca80f4249036 (patch) | |
tree | 0cdb35ff2c8baa859eab8a0e5cc5af5108ae06a4 /networking/udhcp/packet.c | |
parent | 30ebd7bd7838787bdb7de0b484e37e442ab16ac5 (diff) | |
download | busybox-w32-37a658c4c86fa5ad9fb6f76cba2fca80f4249036.tar.gz busybox-w32-37a658c4c86fa5ad9fb6f76cba2fca80f4249036.tar.bz2 busybox-w32-37a658c4c86fa5ad9fb6f76cba2fca80f4249036.zip |
udhcp: handle errors in read_staticlease
also gets rid of ether-aton's static buffer in ether-wake:
text data bss dec hexfilename
838664 441 7572 846677 ceb55busybox_old
838650 441 7564 846655 ceb3fbusybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/packet.c')
-rw-r--r-- | networking/udhcp/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 03d5e1fc8..5b113bc10 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
@@ -113,8 +113,8 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) | |||
113 | }; | 113 | }; |
114 | int i; | 114 | int i; |
115 | for (i = 0; broken_vendors[i][0]; i++) { | 115 | for (i = 0; broken_vendors[i][0]; i++) { |
116 | if (vendor[OPT_LEN - 2] == (uint8_t)strlen(broken_vendors[i]) | 116 | if (vendor[OPT_LEN - OPT_DATA] == (uint8_t)strlen(broken_vendors[i]) |
117 | && !strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - 2]) | 117 | && strncmp((char*)vendor, broken_vendors[i], vendor[OPT_LEN - OPT_DATA]) == 0 |
118 | ) { | 118 | ) { |
119 | log1("Broken client (%s), forcing broadcast replies", | 119 | log1("Broken client (%s), forcing broadcast replies", |
120 | broken_vendors[i]); | 120 | broken_vendors[i]); |
@@ -122,7 +122,7 @@ int FAST_FUNC udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) | |||
122 | } | 122 | } |
123 | } | 123 | } |
124 | #else | 124 | #else |
125 | if (vendor[OPT_LEN - 2] == (uint8_t)(sizeof("MSFT 98")-1) | 125 | if (vendor[OPT_LEN - OPT_DATA] == (uint8_t)(sizeof("MSFT 98")-1) |
126 | && memcmp(vendor, "MSFT 98", sizeof("MSFT 98")-1) == 0 | 126 | && memcmp(vendor, "MSFT 98", sizeof("MSFT 98")-1) == 0 |
127 | ) { | 127 | ) { |
128 | log1("Broken client (%s), forcing broadcast replies", "MSFT 98"); | 128 | log1("Broken client (%s), forcing broadcast replies", "MSFT 98"); |