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/ether-wake.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/ether-wake.c')
-rw-r--r-- | networking/ether-wake.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index e05db7a80..deeb68c09 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -111,10 +111,9 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr) | |||
111 | { | 111 | { |
112 | struct ether_addr *eap; | 112 | struct ether_addr *eap; |
113 | 113 | ||
114 | eap = ether_aton(hostid); | 114 | eap = ether_aton_r(hostid, eaddr); |
115 | if (eap) { | 115 | if (eap) { |
116 | *eaddr = *eap; | 116 | bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eap)); |
117 | bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eaddr)); | ||
118 | #if !defined(__UCLIBC_MAJOR__) \ | 117 | #if !defined(__UCLIBC_MAJOR__) \ |
119 | || __UCLIBC_MAJOR__ > 0 \ | 118 | || __UCLIBC_MAJOR__ > 0 \ |
120 | || __UCLIBC_MINOR__ > 9 \ | 119 | || __UCLIBC_MINOR__ > 9 \ |
@@ -122,8 +121,9 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr) | |||
122 | } else if (ether_hostton(hostid, eaddr) == 0) { | 121 | } else if (ether_hostton(hostid, eaddr) == 0) { |
123 | bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr)); | 122 | bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr)); |
124 | #endif | 123 | #endif |
125 | } else | 124 | } else { |
126 | bb_show_usage(); | 125 | bb_show_usage(); |
126 | } | ||
127 | } | 127 | } |
128 | 128 | ||
129 | static int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast) | 129 | static int get_fill(unsigned char *pkt, struct ether_addr *eaddr, int broadcast) |