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
This commit is contained in:
Enji Cooper 2016-05-29 20:28:01 +00:00
parent 5656b5057e
commit 98a7b0ba5c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300973

View File

@ -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