Don't try to free a NULL route when doing IPFIREWALL_FORWARD.
An old route will be NULL at that point if a packet were initially routed to an interface (using the IP_ROUTETOIF flag.) Submitted by: Igor Timkin <ivt@gamma.ru>
This commit is contained in:
parent
604fb1c032
commit
3f9e31220b
@ -766,7 +766,8 @@ ip_output(m0, opt, ro, flags, imo)
|
||||
(ro_fwd->ro_rt->rt_flags & RTF_BROADCAST);
|
||||
else
|
||||
isbroadcast = in_broadcast(dst->sin_addr, ifp);
|
||||
RTFREE(ro->ro_rt);
|
||||
if (ro->ro_rt)
|
||||
RTFREE(ro->ro_rt);
|
||||
ro->ro_rt = ro_fwd->ro_rt;
|
||||
dst = (struct sockaddr_in *)&ro_fwd->ro_dst;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user