git: 223a73a1c4d1 - main - net: remove stale altq_input reference

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Wed, 07 Sep 2022 10:03:59 UTC
The branch main has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=223a73a1c4d102dd47399538625fb0fe0362f7d7

commit 223a73a1c4d102dd47399538625fb0fe0362f7d7
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-09-06 18:12:54 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-09-07 10:03:12 +0000

    net: remove stale altq_input reference
    
    Code setting it was removed in:
    commit 325fab802e1f40c992141f945d0788c0edfdb1a4
    Author: Eric van Gyzen <vangyzen@FreeBSD.org>
    Date:   Tue Dec 4 23:46:43 2018 +0000
    
        altq: remove ALTQ3_COMPAT code
    
    Reviewed by:    glebius, kp
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D36471
---
 sys/net/altq/altq_subr.c | 1 -
 sys/net/altq/if_altq.h   | 1 -
 sys/netinet/ip_fastfwd.c | 8 --------
 sys/netinet/ip_input.c   | 6 ------
 sys/netinet6/ip6_input.c | 6 ------
 5 files changed, 22 deletions(-)

diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index 32999b694bcb..deadf4ecc9a9 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -78,7 +78,6 @@
  * internal function prototypes
  */
 static void	tbr_timeout(void *);
-int (*altq_input)(struct mbuf *, int) = NULL;
 static struct mbuf *tbr_dequeue(struct ifaltq *, int);
 static int tbr_timer = 0;	/* token bucket regulator timer */
 #if !defined(__FreeBSD__) || (__FreeBSD_version < 600000)
diff --git a/sys/net/altq/if_altq.h b/sys/net/altq/if_altq.h
index e0237ce77fda..ad7502c8ed49 100644
--- a/sys/net/altq/if_altq.h
+++ b/sys/net/altq/if_altq.h
@@ -169,7 +169,6 @@ extern int altq_detach(struct ifaltq *);
 extern int altq_enable(struct ifaltq *);
 extern int altq_disable(struct ifaltq *);
 extern struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int);
-extern int (*altq_input)(struct mbuf *, int);
 #if 0 /* ALTQ3_CLFIER_COMPAT */
 void altq_etherclassify(struct ifaltq *, struct mbuf *, struct altq_pktattr *);
 #endif
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c
index 95a601ced3ef..02a6be78d241 100644
--- a/sys/netinet/ip_fastfwd.c
+++ b/sys/netinet/ip_fastfwd.c
@@ -251,14 +251,6 @@ ip_tryforward(struct mbuf *m)
 	M_ASSERTVALID(m);
 	M_ASSERTPKTHDR(m);
 
-#ifdef ALTQ
-	/*
-	 * Is packet dropped by traffic conditioner?
-	 */
-	if (altq_input != NULL && (*altq_input)(m, AF_INET) == 0)
-		goto drop;
-#endif
-
 	/*
 	 * Only IP packets without options
 	 */
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 41ba82ea81dd..ead32d645acf 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -532,12 +532,6 @@ ip_input(struct mbuf *m)
 		goto bad;
 	}
 
-#ifdef ALTQ
-	if (altq_input != NULL && (*altq_input)(m, AF_INET) == 0)
-		/* packet is dropped by traffic conditioner */
-		return;
-#endif
-
 	ip_len = ntohs(ip->ip_len);
 	if (__predict_false(ip_len < hlen)) {
 		IPSTAT_INC(ips_badlen);
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index fd184db1a985..70bacfb2436a 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -655,12 +655,6 @@ ip6_input(struct mbuf *m)
 		in6_ifstat_inc(rcvif, ifs6_in_addrerr);
 		goto bad;
 	}
-#ifdef ALTQ
-	if (altq_input != NULL && (*altq_input)(m, AF_INET6) == 0) {
-		/* packet is dropped by traffic conditioner */
-		return;
-	}
-#endif
 	/*
 	 * The following check is not documented in specs.  A malicious
 	 * party may be able to use IPv4 mapped addr to confuse tcp/udp stack