summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-07-19 22:34:25 +0000
committerrwatson <rwatson@FreeBSD.org>2007-07-19 22:34:25 +0000
commit5fe56c549d6d29e62ec8852d9f64bf04eae9bbea (patch)
tree7d4fb260b8734fb8d1a0007b3ec7ba7abf85231d /sys/netinet
parent6c9872b62a271bf12611abfee669a19266a2bae6 (diff)
downloadFreeBSD-src-5fe56c549d6d29e62ec8852d9f64bf04eae9bbea.zip
FreeBSD-src-5fe56c549d6d29e62ec8852d9f64bf04eae9bbea.tar.gz
Attempt to improve feature parity between UDPv4 and UDPv6 by merging
UDPv4 features to UDPv6: - Add MAC checks on delivery and MAC labeling on transmit. - Check for (and reject) datagrams with destination port 0. - For multicast delivery, check the source port only if the socket being considered as a destination has been connected. - Implement UDP blackholing based on net.inet.udp.blackhole. - Add a new ICMPv6 unreachable reply rate limiting category for failed delivery attempts and implement rate limiting for UDPv6 (submitted by bz). Approved by: re (kensmith) Reviewed by: bz
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/icmp_var.h3
-rw-r--r--sys/netinet/ip_icmp.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h
index f7bfa8b..dda84f2 100644
--- a/sys/netinet/icmp_var.h
+++ b/sys/netinet/icmp_var.h
@@ -82,7 +82,8 @@ extern int badport_bandlim(int);
#define BANDLIM_ICMP_TSTAMP 2
#define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */
#define BANDLIM_RST_OPENPORT 4 /* No connection, listener */
-#define BANDLIM_MAX 4
+#define BANDLIM_ICMP6_UNREACH 5
+#define BANDLIM_MAX 5
#endif
#endif
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index b330699..36cc020 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -888,7 +888,8 @@ badport_bandlim(int which)
{ "icmp ping response" },
{ "icmp tstamp response" },
{ "closed port RST response" },
- { "open port RST response" }
+ { "open port RST response" },
+ { "icmp6 unreach response" }
};
/*
OpenPOWER on IntegriCloud