aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2004-02-16 17:05:06 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2004-02-16 17:05:06 +0000
commit70dbc6cbfccdc5784be266c15d22b29f3d5fe216 (patch)
tree3f57c32bc3626716d6b2e70184df90a00a0fb666 /sys/netinet
parent06a72d12d153841a2084e7a580d8fbd4c8fc29d9 (diff)
downloadsrc-70dbc6cbfccdc5784be266c15d22b29f3d5fe216.tar.gz
src-70dbc6cbfccdc5784be266c15d22b29f3d5fe216.zip
don't update outgoing ifp, if ipsec tunnel mode encapsulation
was not made. Obtained from: KAME
Notes
Notes: svn path=/head/; revision=125875
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 26d76cb9cd3e..4ab15280bd5c 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);