aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1994-08-01 12:01:45 +0000
committerDavid Greenman <dg@FreeBSD.org>1994-08-01 12:01:45 +0000
commitb53902964f16213c213357c7befd5168e04acd66 (patch)
tree39ec6015a22b769173bcfa25488922d34e259fc6
parentb164106fa7c50fde58d3824ec0ea34590700ba21 (diff)
Notes
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 1fb1481c3110..89c6de4ad594 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -255,6 +255,16 @@ ip_output(m0, opt, ro, flags, imo)
ip->ip_src = IA_SIN(ia)->sin_addr;
#endif
/*
+ * Verify that we have any chance at all of being able to queue
+ * the packet or packet fragments
+ */
+ if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >=
+ ifp->if_snd.ifq_maxlen) {
+ error = ENOBUFS;
+ goto bad;
+ }
+
+ /*
* Look for broadcast address and
* and verify user is allowed to send
* such a packet.