fix busybox --help problems on rebuild
[openwrt.git] / package / busybox / patches / 260-broadcast_plus.patch
1 Index: busybox-1.4.2/networking/ifconfig.c
2 ===================================================================
3 --- busybox-1.4.2.orig/networking/ifconfig.c 2007-06-29 02:03:17.046772952 +0200
4 +++ busybox-1.4.2/networking/ifconfig.c 2007-06-29 02:03:49.938772608 +0200
5 @@ -376,18 +376,18 @@
6 #endif
7 sai.sin_family = AF_INET;
8 sai.sin_port = 0;
9 - if (!strcmp(host, bb_str_default)) {
10 - /* Default is special, meaning 0.0.0.0. */
11 - sai.sin_addr.s_addr = INADDR_ANY;
12 - }
13 #if ENABLE_FEATURE_IFCONFIG_BROADCAST_PLUS
14 - else if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST)
15 + if ((host[0] == '+' && !host[1]) && (mask & A_BROADCAST)
16 && (did_flags & (A_NETMASK|A_HOSTNAME)) == (A_NETMASK|A_HOSTNAME)
17 ) {
18 /* + is special, meaning broadcast is derived. */
19 sai.sin_addr.s_addr = (~sai_netmask) | (sai_hostname & sai_netmask);
20 - }
21 + } else
22 #endif
23 + if (!strcmp(host, bb_str_default)) {
24 + /* Default is special, meaning 0.0.0.0. */
25 + sai.sin_addr.s_addr = INADDR_ANY;
26 + }
27 #if ENABLE_FEATURE_IPV6
28 else if (inet_pton(AF_INET6, host, &sai6.sin6_addr) > 0) {
29 int sockfd6;
This page took 0.045796 seconds and 5 git commands to generate.