1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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:
Yaroslav Tykhiy 2001-12-19 14:54:13 +00:00
parent 604fb1c032
commit 3f9e31220b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88190

View File

@ -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;