summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-02-16 17:05:06 +0000
committerume <ume@FreeBSD.org>2004-02-16 17:05:06 +0000
commita9d87abe7e1120f79691ffd3294ac30946e411ad (patch)
tree3f57c32bc3626716d6b2e70184df90a00a0fb666 /sys/netinet
parente0e9092c4478073c4a7529b87f580e4fd1b6c66a (diff)
downloadFreeBSD-src-a9d87abe7e1120f79691ffd3294ac30946e411ad.zip
FreeBSD-src-a9d87abe7e1120f79691ffd3294ac30946e411ad.tar.gz
don't update outgoing ifp, if ipsec tunnel mode encapsulation
was not made. Obtained from: KAME
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 26d76cb..4ab1528 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -569,7 +569,6 @@ sendit:
}
goto bad;
}
- }
/* be sure to update variables that are affected by ipsec4_output() */
ip = mtod(m, struct ip *);
@@ -582,9 +581,12 @@ sendit:
goto bad;
}
} else {
- ia = ifatoia(ro->ro_rt->rt_ifa);
- ifp = ro->ro_rt->rt_ifp;
+ if (state.encap) {
+ ia = ifatoia(ro->ro_rt->rt_ifa);
+ ifp = ro->ro_rt->rt_ifp;
+ }
}
+ }
/* make it flipped, again. */
ip->ip_len = ntohs(ip->ip_len);
OpenPOWER on IntegriCloud