summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Oppermann <andre@FreeBSD.org>2004-01-06 23:20:07 +0000
committerAndre Oppermann <andre@FreeBSD.org>2004-01-06 23:20:07 +0000
commit87c3bd275523515dc67444b900a8f1d39ae257cd (patch)
treeb5c50f092af9c552504c3b7feeec05177c60b8ff
parent06d557cc465415403a063bf7383cc473f0425ab6 (diff)
Notes
-rw-r--r--sys/netinet/ip_icmp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index b84d6897fc1d..a4e0a9666b09 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -543,7 +543,11 @@ reflect:
(int)(gw >> 24), (int)((gw >> 16) & 0xff),
(int)((gw >> 8) & 0xff), (int)(gw & 0xff));
}
- if (drop_redirect)
+ /*
+ * RFC1812 says we must ignore ICMP redirects if we
+ * are acting as router.
+ */
+ if (drop_redirect || ipforwarding)
break;
if (code > 3)
goto badcode;