]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/net/if.c
xnu-344.32.tar.gz
[apple/xnu.git] / bsd / net / if.c
index 17213f3dbd3d454df8cf1b633c9a812aa77da3b2..094210bce7689747b368f732b8d12a042f4558c8 100644 (file)
@@ -1394,6 +1394,6 @@ void if_rtproto_del(struct ifnet *ifp, int protocol)
        
         struct radix_node_head  *rnh;
 
-       if (((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL)) 
+       if ((protocol <= AF_MAX) && ((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL))
                (void) rnh->rnh_walktree(rnh, if_rtdel, ifp);
 }