diff options
author | melifaro <melifaro@FreeBSD.org> | 2014-11-10 23:10:01 +0000 |
---|---|---|
committer | melifaro <melifaro@FreeBSD.org> | 2014-11-10 23:10:01 +0000 |
commit | ea5b796615ddbde24284c0c25900e8605469cf83 (patch) | |
tree | f99afb8bda1a0d58e2c45cb12fd9826a7f2263ec | |
parent | 3600d5f7ad50f1db1d31bc098f71e3ae5746d1fc (diff) | |
download | FreeBSD-src-ea5b796615ddbde24284c0c25900e8605469cf83.zip FreeBSD-src-ea5b796615ddbde24284c0c25900e8605469cf83.tar.gz |
Remove kernel handling of ICMP_SOURCEQUENCH.
It hasn't been used for a very long time.
Additionally, it was deprecated by RFC 6633.
-rw-r--r-- | sys/netinet/ip_fastfwd.c | 1 | ||||
-rw-r--r-- | sys/netinet/ip_icmp.c | 7 | ||||
-rw-r--r-- | sys/netinet/ip_input.c | 25 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 8 | ||||
-rw-r--r-- | sys/sys/protosw.h | 4 | ||||
-rw-r--r-- | tools/tools/sysdoc/tunables.mdoc | 9 |
6 files changed, 3 insertions, 51 deletions
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 36d9985..e9196cc 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -502,7 +502,6 @@ passout: if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= ifp->if_snd.ifq_maxlen) { IPSTAT_INC(ips_odropped); - /* would send source quench here but that is depreciated */ goto drop; } #endif diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 23f7a56..25ccb4f 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -486,12 +486,6 @@ icmp_input(struct mbuf **mp, int *offp, int proto) if (code > 1) goto badcode; code = PRC_PARAMPROB; - goto deliver; - - case ICMP_SOURCEQUENCH: - if (code) - goto badcode; - code = PRC_QUENCH; deliver: /* * Problem with datagram; advise higher level routines. @@ -670,6 +664,7 @@ reflect: case ICMP_TSTAMPREPLY: case ICMP_IREQREPLY: case ICMP_MASKREPLY: + case ICMP_SOURCEQUENCH: default: break; } diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 1ad020a..6f48d93 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -104,12 +104,6 @@ SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_R &VNET_NAME(ipsendredirects), 0, "Enable sending IP redirects"); -static VNET_DEFINE(int, ip_sendsourcequench); -#define V_ip_sendsourcequench VNET(ip_sendsourcequench) -SYSCTL_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ip_sendsourcequench), 0, - "Enable the transmission of source quench packets"); - VNET_DEFINE(int, ip_do_randomid); SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_do_randomid), 0, @@ -1647,25 +1641,6 @@ ip_forward(struct mbuf *m, int srcrt) break; case ENOBUFS: - /* - * A router should not generate ICMP_SOURCEQUENCH as - * required in RFC1812 Requirements for IP Version 4 Routers. - * Source quench could be a big problem under DoS attacks, - * or if the underlying interface is rate-limited. - * Those who need source quench packets may re-enable them - * via the net.inet.ip.sendsourcequench sysctl. - */ - if (V_ip_sendsourcequench == 0) { - m_freem(mcopy); - if (ia != NULL) - ifa_free(&ia->ia_ifa); - return; - } else { - type = ICMP_SOURCEQUENCH; - code = 0; - } - break; - case EACCES: /* ipfw denied packet */ m_freem(mcopy); if (ia != NULL) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b5152d2..5b845f0 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1430,11 +1430,6 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) else if (PRC_IS_REDIRECT(cmd)) return; /* - * Source quench is depreciated. - */ - else if (cmd == PRC_QUENCH) - return; - /* * Hostdead is ugly because it goes linearly through all PCBs. * XXX: We never get this from ICMP, otherwise it makes an * excellent DoS attack on machines with many connections. @@ -1539,9 +1534,6 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d) else if (!PRC_IS_REDIRECT(cmd) && ((unsigned)cmd >= PRC_NCMDS || inet6ctlerrmap[cmd] == 0)) return; - /* Source quench is depreciated. */ - else if (cmd == PRC_QUENCH) - return; /* if the parameter is from icmp6, decode it. */ if (d != NULL) { diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index ba45f94..2d98a4c 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -274,8 +274,8 @@ int pru_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, #define PRC_IFDOWN 0 /* interface transition */ #define PRC_ROUTEDEAD 1 /* select new route if possible ??? */ #define PRC_IFUP 2 /* interface has come back up */ -#define PRC_QUENCH2 3 /* DEC congestion bit says slow down */ -#define PRC_QUENCH 4 /* some one said to slow down */ +/* was PRC_QUENCH2 3 DEC congestion bit says slow down */ +/* was PRC_QUENCH 4 Deprecated by RFC 6633 */ #define PRC_MSGSIZE 5 /* message size forced drop */ #define PRC_HOSTDEAD 6 /* host appears to be down */ #define PRC_HOSTUNREACH 7 /* deprecated (use PRC_UNREACH_HOST) */ diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc index 6d88856..12b6f46 100644 --- a/tools/tools/sysdoc/tunables.mdoc +++ b/tools/tools/sysdoc/tunables.mdoc @@ -1347,15 +1347,6 @@ See for more information. --- -net.inet.ip.sendsourcequench -bool - -This -.Nm -enables or disables the transmission of -source quench packets. - ---- net.inet.ip.sourceroute bool |