From 907e8031833ae6da6fc03feed7addd7d63b5017f Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Sun, 5 Nov 2017 13:20:00 +0000 Subject: Finish off pr_drain functions, they haven't been used since 2006. OK mpi --- sys/netinet/in_proto.c | 3 +-- sys/netinet/ip_input.c | 16 +--------------- sys/netinet/ip_var.h | 3 +-- 3 files changed, 3 insertions(+), 19 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 6efbac7da5c..3104a8ff6f3 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_proto.c,v 1.80 2017/11/02 14:01:18 florian Exp $ */ +/* $OpenBSD: in_proto.c,v 1.81 2017/11/05 13:19:59 florian Exp $ */ /* $NetBSD: in_proto.c,v 1.14 1996/02/18 18:58:32 christos Exp $ */ /* @@ -179,7 +179,6 @@ struct protosw inetsw[] = { .pr_domain = &inetdomain, .pr_init = ip_init, .pr_slowtimo = ip_slowtimo, - .pr_drain = ip_drain, .pr_sysctl = ip_sysctl }, { diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index c02e95de474..1b7c323d88f 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.328 2017/11/01 06:35:38 mpi Exp $ */ +/* $OpenBSD: ip_input.c,v 1.329 2017/11/05 13:19:59 florian Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -1038,20 +1038,6 @@ ip_slowtimo(void) mtx_leave(&ipq_mutex); } -/* - * Drain off all datagram fragments. - */ -void -ip_drain(void) -{ - mtx_enter(&ipq_mutex); - while (!LIST_EMPTY(&ipq)) { - ipstat_inc(ips_fragdropped); - ip_freef(LIST_FIRST(&ipq)); - } - mtx_leave(&ipq_mutex); -} - /* * Flush a bunch of datagram fragments, till we are down to 75%. */ diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 26429f9be08..c9241370839 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_var.h,v 1.83 2017/11/02 14:01:18 florian Exp $ */ +/* $OpenBSD: ip_var.h,v 1.84 2017/11/05 13:19:59 florian Exp $ */ /* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */ /* @@ -216,7 +216,6 @@ struct route; struct inpcb; int ip_ctloutput(int, struct socket *, int, int, struct mbuf *); -void ip_drain(void); void ip_flush(void); int ip_fragment(struct mbuf *, struct ifnet *, u_long); void ip_freef(struct ipq *); -- cgit v1.2.3