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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to