diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-12-07 12:25:17 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-12-07 12:25:17 +0000 |
commit | 57d83ff5f9e56e881d0c75ee981db3fb3f1d4903 (patch) | |
tree | 76613dc5be8c4b874605ba796ffd32c864706faa /networking/interface.c | |
parent | 1819eee436198b52c30bfdd4a15fb3c6a5f2aef1 (diff) | |
download | busybox-w32-57d83ff5f9e56e881d0c75ee981db3fb3f1d4903.tar.gz busybox-w32-57d83ff5f9e56e881d0c75ee981db3fb3f1d4903.tar.bz2 busybox-w32-57d83ff5f9e56e881d0c75ee981db3fb3f1d4903.zip |
- Proposed fix to make aliases work (with uClibc-current).
See comment in the patch about the change introduced in r16342.
Diffstat (limited to 'networking/interface.c')
-rw-r--r-- | networking/interface.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/interface.c b/networking/interface.c index cabfc063b..dd455823b 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -343,8 +343,10 @@ static void sockets_close(void) | |||
343 | } | 343 | } |
344 | } | 344 | } |
345 | #endif | 345 | #endif |
346 | 346 | #if 0 | |
347 | /* like strcmp(), but knows about numbers */ | 347 | /* like strcmp(), but knows about numbers */ |
348 | except that the freshly added calls to xatoul() brf on ethernet aliases with | ||
349 | uClibc with e.g.: ife->name='lo' name='eth0:1' | ||
348 | static int nstrcmp(const char *a, const char *b) | 350 | static int nstrcmp(const char *a, const char *b) |
349 | { | 351 | { |
350 | const char *a_ptr = a; | 352 | const char *a_ptr = a; |
@@ -367,13 +369,14 @@ static int nstrcmp(const char *a, const char *b) | |||
367 | } | 369 | } |
368 | return *a - *b; | 370 | return *a - *b; |
369 | } | 371 | } |
372 | #endif | ||
370 | 373 | ||
371 | static struct interface *add_interface(char *name) | 374 | static struct interface *add_interface(char *name) |
372 | { | 375 | { |
373 | struct interface *ife, **nextp, *new; | 376 | struct interface *ife, **nextp, *new; |
374 | 377 | ||
375 | for (ife = int_last; ife; ife = ife->prev) { | 378 | for (ife = int_last; ife; ife = ife->prev) { |
376 | int n = nstrcmp(ife->name, name); | 379 | int n = /*n*/strcmp(ife->name, name); |
377 | 380 | ||
378 | if (n == 0) | 381 | if (n == 0) |
379 | return ife; | 382 | return ife; |