svn commit: r252625 - head/sbin/dhclient

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Jul 3 22:09:02 UTC 2013


Author: pjd
Date: Wed Jul  3 22:09:02 2013
New Revision: 252625
URL: http://svnweb.freebsd.org/changeset/base/252625

Log:
  MFp4 @229480:
  
  Shutdown write direction of the routing socket. We only need to read from it.
  
  Reviewed by:	brooks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sbin/dhclient/dhclient.c

Modified: head/sbin/dhclient/dhclient.c
==============================================================================
--- head/sbin/dhclient/dhclient.c	Wed Jul  3 22:07:55 2013	(r252624)
+++ head/sbin/dhclient/dhclient.c	Wed Jul  3 22:09:02 2013	(r252625)
@@ -476,6 +476,8 @@ main(int argc, char *argv[])
 
 	if ((routefd = socket(PF_ROUTE, SOCK_RAW, 0)) != -1)
 		add_protocol("AF_ROUTE", routefd, routehandler, ifi);
+	if (shutdown(routefd, SHUT_WR) < 0)
+		error("can't shutdown route socket: %m");
 
 	/* set up the interface */
 	discover_interfaces(ifi);


More information about the svn-src-all mailing list