~ubuntu-branches/ubuntu/trusty/busybox/trusty

« back to all changes in this revision

Viewing changes to libbb/inet_common.c

  • Committer: Scott Moser
  • Date: 2011-05-27 16:06:28 UTC
  • mfrom: (68.1.6 oneiric)
  • Revision ID: smoser@ubuntu.com-20110527160628-t1lo3pfw92ef8vnf
* Resynchronise with Debian (LP: #788888).  Remaining changes:
  - [udeb] Enable chvt, getopt (and -l), killall, losetup, NFS
    mount, od, ping, stat, and remote syslog.
  - [deb] Enable mdev.
  - [deb, static] Enable fractional sleep and CGI support for httpd.
  - Enable 'mount -f' and mount helpers for all targets.
  - Add busybox-initramfs.
  - test-bin.patch: Move test and friends to /bin.
  - static-sh-alias.patch: Add static-sh alias name for ash, and install
    /bin/static-sh symlink to busybox in busybox-static.
  - Add cross-compiling support.
* grep-o-loop.patch: dropped as fix and testcase in upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 * Heavily modified by Manuel Novoa III       Mar 12, 2001
7
7
 *
8
 
 * Licensed under GPLv2, see file LICENSE in this tarball for details.
 
8
 * Licensed under GPLv2, see file LICENSE in this source tree.
9
9
 */
10
10
 
11
11
#include "libbb.h"
23
23
        s_in->sin_port = 0;
24
24
 
25
25
        /* Default is special, meaning 0.0.0.0. */
26
 
        if (!strcmp(name, bb_str_default)) {
 
26
        if (strcmp(name, "default") == 0) {
27
27
                s_in->sin_addr.s_addr = INADDR_ANY;
28
28
                return 1;
29
29
        }
109
109
        if (ad == INADDR_ANY) {
110
110
                if ((numeric & 0x0FFF) == 0) {
111
111
                        if (numeric & 0x8000)
112
 
                                return xstrdup(bb_str_default);
 
112
                                return xstrdup("default");
113
113
                        return xstrdup("*");
114
114
                }
115
115
        }
205
205
        }
206
206
        if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
207
207
                if (numeric & 0x8000)
208
 
                        return xstrdup(bb_str_default);
 
208
                        return xstrdup("default");
209
209
                return xstrdup("*");
210
210
        }
211
211
 
218
218
        return xstrdup(name);
219
219
}
220
220
 
221
 
#endif          /* CONFIG_FEATURE_IPV6 */
 
221
#endif  /* CONFIG_FEATURE_IPV6 */