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:
qingli 2009-08-28 05:37:31 +00:00
parent 6473998f11
commit eb767da59e

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