Remove unused experimental ICMP6 redirect low water bits
authorkn <kn@openbsd.org>
Sat, 10 Dec 2022 23:45:51 +0000 (23:45 +0000)
committerkn <kn@openbsd.org>
Sat, 10 Dec 2022 23:45:51 +0000 (23:45 +0000)
Dead since introduction in 2001 with icmp6.c r1.31:
    implement upper limit to icmp6 redirects (experimental, turned off)
    negative value to {mtudisc,redirect}_{hi,lo}wat will turn off the limitation.
    sync with kame.

icmp6_redirect_lowat was always -1 and never hit the empty conditional.

icmp6_redirect_hiwat never existed.

icmp6_mtudisc_{hi,lo}wat are exposed as net.inet6.icmp6.mtudisc_{hi,lo}wat
sysctl(2)s, so don't touch those for now.

OK mvs

sys/netinet6/icmp6.c

index 9f67f56..a1174a1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: icmp6.c,v 1.246 2022/12/10 22:40:58 kn Exp $  */
+/*     $OpenBSD: icmp6.c,v 1.247 2022/12/10 23:45:51 kn Exp $  */
 /*     $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
 
 /*
@@ -129,9 +129,6 @@ static int icmp6_mtudisc_lowat = 256;
  */
 struct rttimer_queue icmp6_redirect_timeout_q;
 
-/* XXX experimental, turned off */
-static int icmp6_redirect_lowat = -1;
-
 void   icmp6_errcount(int, int);
 int    icmp6_ratelimit(const struct in6_addr *, const int, const int);
 const char *icmp6_redirect_diag(struct in6_addr *, struct in6_addr *,
@@ -1386,12 +1383,6 @@ icmp6_redirect_input(struct mbuf *m, int off)
                rtcount = rt_timer_queue_count(&icmp6_redirect_timeout_q);
                if (0 <= ip6_maxdynroutes && rtcount >= ip6_maxdynroutes)
                        goto freeit;
-               else if (0 <= icmp6_redirect_lowat &&
-                   rtcount > icmp6_redirect_lowat) {
-                       /*
-                        * XXX nuke a victim, install the new one.
-                        */
-               }
 
                bzero(&sdst, sizeof(sdst));
                bzero(&sgw, sizeof(sgw));