summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/in_proto.c3
-rw-r--r--sys/netinet/ip_input.c16
-rw-r--r--sys/netinet/ip_var.h3
-rw-r--r--sys/netinet6/frag6.c19
-rw-r--r--sys/netinet6/in6_proto.c3
-rw-r--r--sys/netinet6/ip6_var.h3
-rw-r--r--sys/sys/protosw.h5
7 files changed, 7 insertions, 45 deletions
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 $ */
/*
@@ -1039,20 +1039,6 @@ ip_slowtimo(void)
}
/*
- * 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%.
*/
void
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 *);
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index a5b8ae261be..20bbcd1ce33 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.77 2017/10/29 14:56:36 florian Exp $ */
+/* $OpenBSD: frag6.c,v 1.78 2017/11/05 13:19:59 florian Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -633,20 +633,3 @@ frag6_slowtimo(void)
NET_UNLOCK();
}
-
-/*
- * Drain off all datagram fragments.
- */
-void
-frag6_drain(void)
-{
- struct ip6q *q6;
-
- if (ip6q_lock_try() == 0)
- return;
- while ((q6 = TAILQ_FIRST(&frag6_queue)) != NULL) {
- ip6stat_inc(ip6s_fragdropped);
- frag6_freef(q6);
- }
- IP6Q_UNLOCK();
-}
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index a112d731163..ea889b3d3ec 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_proto.c,v 1.96 2017/11/02 14:01:18 florian Exp $ */
+/* $OpenBSD: in6_proto.c,v 1.97 2017/11/05 13:19:59 florian Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
@@ -127,7 +127,6 @@ struct protosw inet6sw[] = {
.pr_protocol = IPPROTO_IPV6,
.pr_init = ip6_init,
.pr_slowtimo = frag6_slowtimo,
- .pr_drain = frag6_drain,
.pr_sysctl = ip6_sysctl
},
{
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h
index 09dd373bc3e..370f23f804b 100644
--- a/sys/netinet6/ip6_var.h
+++ b/sys/netinet6/ip6_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_var.h,v 1.80 2017/11/02 14:01:18 florian Exp $ */
+/* $OpenBSD: ip6_var.h,v 1.81 2017/11/05 13:19:59 florian Exp $ */
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
/*
@@ -334,7 +334,6 @@ void frag6_init(void);
int frag6_input(struct mbuf **, int *, int, int);
int frag6_deletefraghdr(struct mbuf *, int);
void frag6_slowtimo(void);
-void frag6_drain(void);
void rip6_init(void);
int rip6_input(struct mbuf **, int *, int, int);
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index 4dd57001f7d..f7691fd11fd 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: protosw.h,v 1.26 2017/11/02 14:01:18 florian Exp $ */
+/* $OpenBSD: protosw.h,v 1.27 2017/11/05 13:19:59 florian Exp $ */
/* $NetBSD: protosw.h,v 1.10 1996/04/09 20:55:32 cgd Exp $ */
/*-
@@ -41,8 +41,6 @@
* A protocol is called through the pr_init entry before any other.
* Thereafter it is called every 200ms through the pr_fasttimo entry and
* every 500ms through the pr_slowtimo for timer based actions.
- * The system will call the pr_drain entry if it is low on space and
- * this should throw away any non-critical data.
*
* Protocols pass data between themselves as chains of mbufs using
* the pr_input and pr_output hooks. Pr_input passes data up (towards
@@ -90,7 +88,6 @@ struct protosw {
void (*pr_init)(void); /* initialization hook */
void (*pr_fasttimo)(void); /* fast timeout (200ms) */
void (*pr_slowtimo)(void); /* slow timeout (500ms) */
- void (*pr_drain)(void); /* flush any excess space possible */
/* sysctl for protocol */
int (*pr_sysctl)(int *, u_int, void *, size_t *, void *, size_t);
};