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>
This commit is contained in:
parent
c9d337083f
commit
54bb7ac0c4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347466
@ -361,7 +361,11 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
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) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user