fix for rt_newmaddmsg panic()

Andrew Atrens atrens at nortelnetworks.com
Wed Feb 23 13:48:35 PST 2005


whoops, the previous diff was reversed. :)
--- rtsock.c.old	2005-02-23 16:39:12.000000000 -0500
+++ rtsock.c	2005-02-23 16:39:22.000000000 -0500
@@ -972,7 +972,7 @@
 
 	bzero(&rtinfo, sizeof(struct rt_addrinfo));
 	rtinfo.rti_ifaaddr = ifma->ifma_addr;
-	if (ifp != NULL)
+	if (ifp != NULL && TAILQ_FIRST(&ifp->if_addrhead) != NULL)
 		rtinfo.rti_ifpaddr = TAILQ_FIRST(&ifp->if_addrhead)->ifa_addr;
 	else
 		rtinfo.rti_ifpaddr = NULL;




More information about the Submit mailing list