Author: glebius Date: Fri May 10 21:51:17 2019 New Revision: 347466 URL: https://svnweb.freebsd.org/changeset/base/347466
Log: Fix regression from r347375: do not panic when sending an IP multicast packet from an interface that doesn't have IPv4 address. Reported by: Michael Butler <imb protected-networks.net> Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri May 10 20:15:40 2019 (r347465) +++ head/sys/netinet/ip_output.c Fri May 10 21:51:17 2019 (r347466) @@ -361,7 +361,11 @@ again: mtu = ifp->if_mtu; IFP_TO_IA(ifp, ia, &in_ifa_tracker); isbroadcast = 0; /* fool gcc */ - src = IA_SIN(ia)->sin_addr; + /* Interface may have no addresses. */ + if (ia != NULL) + src = IA_SIN(ia)->sin_addr; + else + src.s_addr = INADDR_ANY; } else if (ro != NULL) { if (ro->ro_rt == NULL) { /* _______________________________________________ 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"