diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-18 15:04:30 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-18 15:04:30 -0400 |
commit | 78726453ea2dfc6f34c99a660c543df659b62a58 (patch) | |
tree | dcc992eef1a18b01059b515fbab46d738ccfa6d3 /gpsd.c | |
parent | ade8609bc24f4220220ca75f4e5d5010bd8a7f3f (diff) | |
download | gpsd-78726453ea2dfc6f34c99a660c543df659b62a58.tar.gz |
Revert "Try once again to make -G work with IPV6."
That change led to a spurious message about the listen address already
being in use.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -402,10 +402,17 @@ static int passivesock_af(int af, char *service, char *tcp_or_udp, int qlen) sat.sa_in6.sin6_family = (sa_family_t) AF_INET6; #ifndef FORCE_GLOBAL_ENABLE if (!listen_global) - sat.sa_in6.sin6_addr = in6addr_loopback; - else + sat.sa_in6.sin6_addr = in6addr_loopback; #endif /* FORCE_GLOBAL_ENABLE */ - sat.sa_in6.sin6_addr = in6addr_any; + /* else */ + /* BAD: sat.sa_in6.sin6_addr = in6addr_any; + * the simple assignment will not work (except as an initializer) + * because sin6_addr is an array not a simple type + * we could do something like this: + * memcpy(sat.sa_in6.sin6_addr, in6addr_any, sizeof(sin6_addr)); + * BUT, all zeros is IPv6 wildcard, and we just zeroed the array + * so really nothing to do here + */ sat.sa_in6.sin6_port = htons(port); /* |