diff options
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 8 |
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); |