Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2016 20:28:01 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300973 - head/usr.sbin/rpcbind
Message-ID:  <201605292028.u4TKS1iJ017186@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun May 29 20:28:01 2016
New Revision: 300973
URL: https://svnweb.freebsd.org/changeset/base/300973

Log:
  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

Modified:
  head/usr.sbin/rpcbind/util.c

Modified: head/usr.sbin/rpcbind/util.c
==============================================================================
--- head/usr.sbin/rpcbind/util.c	Sun May 29 19:46:34 2016	(r300972)
+++ head/usr.sbin/rpcbind/util.c	Sun May 29 20:28:01 2016	(r300973)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605292028.u4TKS1iJ017186>