Author: np
Date: Thu Jan 21 10:12:21 2010
New Revision: 202739
URL: http://svn.freebsd.org/changeset/base/202739

Log:
  MFC r201416:
  
  Avoid NULL dereference in arpresolve.
  
  Requested by: kib@

Modified:
  stable/8/sys/netinet/if_ether.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/if_ether.c
==============================================================================
--- stable/8/sys/netinet/if_ether.c     Thu Jan 21 10:09:19 2010        
(r202738)
+++ stable/8/sys/netinet/if_ether.c     Thu Jan 21 10:12:21 2010        
(r202739)
@@ -366,8 +366,8 @@ retry:
        if (la->la_asked < V_arp_maxtries)
                error = EWOULDBLOCK;    /* First request. */
        else
-               error =
-                       (rt0->rt_flags & RTF_GATEWAY) ? EHOSTUNREACH : 
EHOSTDOWN;
+               error = rt0 != NULL && (rt0->rt_flags & RTF_GATEWAY) ?
+                   EHOSTUNREACH : EHOSTDOWN;
 
        if (renew) {
                LLE_ADDREF(la);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to