diff options
author | ngie <ngie@FreeBSD.org> | 2016-05-29 20:28:01 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-05-29 20:28:01 +0000 |
commit | 84bc11e56648fd55c8d61b2e2ab687583c8c1bc5 (patch) | |
tree | 8dd03de9b26162b16990a59c049e98e614fb803e | |
parent | 1ae96dc8dbea2290d14c8d47d035e31676b93982 (diff) | |
download | FreeBSD-src-84bc11e56648fd55c8d61b2e2ab687583c8c1bc5.zip FreeBSD-src-84bc11e56648fd55c8d61b2e2ab687583c8c1bc5.tar.gz |
Follow up to r300932
In the event MK_INET6 != no in userspace, but is disabled in the
kernel, or if there aren't any IPv6 addresses configured in userspace
(for lo0 and all physical interfaces), rpcbind would terminate
immediately instead of silently failing on
Skip over the IPv6 block to its respective cleanup with freeifaddrs if
creating the socket failed instead of terminating rpcbind immediately
MFC after: 6 days
X-MFC with: r300932
Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>
Sponsored by: EMC / Isilon Storage Division
-rw-r--r-- | usr.sbin/rpcbind/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/rpcbind/util.c b/usr.sbin/rpcbind/util.c index 7ada376..1539b18 100644 --- a/usr.sbin/rpcbind/util.c +++ b/usr.sbin/rpcbind/util.c @@ -371,7 +371,7 @@ network_init(void) if (s == -1) { if (debugging) fprintf(stderr, "couldn't create ip6 socket"); - exit(1); + goto done_inet6; } /* @@ -394,6 +394,7 @@ network_init(void) if (debugging) perror("setsockopt v6 multicast"); } +done_inet6: freeifaddrs(ifp); #endif |