diff options
author | suz <suz@FreeBSD.org> | 2005-08-10 09:13:35 +0000 |
---|---|---|
committer | suz <suz@FreeBSD.org> | 2005-08-10 09:13:35 +0000 |
commit | 62a02b864f3e4ef54813056a19aa3d737e1d2db4 (patch) | |
tree | 7f1c2abf085f583d760b85a80a732aa747bc02ed /sys/netinet6/ip6_forward.c | |
parent | d5d343a0fd32ccf4d1ac54fbf4e20d7373d6835e (diff) | |
download | FreeBSD-src-62a02b864f3e4ef54813056a19aa3d737e1d2db4.zip FreeBSD-src-62a02b864f3e4ef54813056a19aa3d737e1d2db4.tar.gz |
supports stealth forwarding in IPv6, as well as in IPv4
PR: kern/54625
MFC after: 1 week
Diffstat (limited to 'sys/netinet6/ip6_forward.c')
-rw-r--r-- | sys/netinet6/ip6_forward.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index e003452..5041fe8 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -34,6 +34,7 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_ipstealth.h" #include <sys/param.h> #include <sys/systm.h> @@ -161,6 +162,9 @@ ip6_forward(m, srcrt) return; } +#ifdef IPSTEALTH + if (!ip6stealth) { +#endif if (ip6->ip6_hlim <= IPV6_HLIMDEC) { /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */ icmp6_error(m, ICMP6_TIME_EXCEEDED, @@ -169,6 +173,10 @@ ip6_forward(m, srcrt) } ip6->ip6_hlim -= IPV6_HLIMDEC; +#ifdef IPSTEALTH + } +#endif + /* * Save at most ICMPV6_PLD_MAXLEN (= the min IPv6 MTU - * size of IPv6 + ICMPv6 headers) bytes of the packet in case |