svn commit: r286945 - head/sys/netinet

Alexander V. Chernikov melifaro at FreeBSD.org
Wed Aug 19 21:08:43 UTC 2015


Author: melifaro
Date: Wed Aug 19 21:08:42 2015
New Revision: 286945
URL: https://svnweb.freebsd.org/changeset/base/286945

Log:
  Check value return from lle_create() for NULL.
  This bug sneaked unnoticed in r286722.
  
  Reported by:	adrian

Modified:
  head/sys/netinet/if_ether.c

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c	Wed Aug 19 21:04:50 2015	(r286944)
+++ head/sys/netinet/if_ether.c	Wed Aug 19 21:08:42 2015	(r286945)
@@ -790,10 +790,13 @@ match:
 		 */
 		IF_AFDATA_WLOCK(ifp);
 		la = lla_create(LLTABLE(ifp), 0, (struct sockaddr *)&sin);
-		arp_update_lle(ah, ifp, la);
+		if (la != NULL)
+			arp_update_lle(ah, ifp, la);
 		IF_AFDATA_WUNLOCK(ifp);
-		arp_mark_lle_reachable(la);
-		LLE_WUNLOCK(la);
+		if (la != NULL) {
+			arp_mark_lle_reachable(la);
+			LLE_WUNLOCK(la);
+		}
 	}
 reply:
 	if (op != ARPOP_REQUEST)


More information about the svn-src-head mailing list