Do not try to free the rt_lle entry of the cached route in

ip_output() if the cached route was not initialized from the
flow-table. The rt_lle entry is invalid unless it has been
initialized through the flow-table.

Reviewed by:	kmacy, rwatson
MFC after:	immediately
This commit is contained in:
Qing Li 2009-08-28 05:37:31 +00:00
parent 840f51bb6d
commit 0437a93339
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196608

View file

@ -202,10 +202,8 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
dst->sin_family != AF_INET ||
dst->sin_addr.s_addr != ip->ip_dst.s_addr)) {
if (!nortfree) {
if (!nortfree)
RTFREE(ro->ro_rt);
LLE_FREE(ro->ro_lle);
}
ro->ro_rt = (struct rtentry *)NULL;
ro->ro_lle = (struct llentry *)NULL;
}