summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-10-18 03:04:55 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-10-18 03:04:55 +0000
commitc99a600e0a1fec1e87fd19470c2c4cf7c8ce36ed (patch)
treea9aba791427ab61125864a868ea5a862e72b21f9
parent62013804f5716950008a0e52da736da16dff4fcc (diff)
Do not run IP defragmentation routines unneccecarily; NetBSD PR# 2772
-rw-r--r--sys/netinet/ip.h1
-rw-r--r--sys/netinet/ip_input.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h
index 54b45e31234..3214fb3f920 100644
--- a/sys/netinet/ip.h
+++ b/sys/netinet/ip.h
@@ -61,6 +61,7 @@ struct ip {
int16_t ip_len; /* total length */
u_int16_t ip_id; /* identification */
int16_t ip_off; /* fragment offset field */
+#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 56ee3eabadf..5e74333f709 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.17 1996/09/02 18:14:19 dm Exp $ */
+/* $OpenBSD: ip_input.c,v 1.18 1996/10/18 03:04:54 tholo Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -383,7 +383,7 @@ ours:
* if the packet was previously fragmented,
* but it's not worth the time; just let them time out.)
*/
- if (ip->ip_off &~ IP_DF) {
+ if (ip->ip_off &~ (IP_DF | IP_RF)) {
if (m->m_flags & M_EXT) { /* XXX */
if ((m = m_pullup(m, sizeof (struct ip))) == 0) {
ipstat.ips_toosmall++;