From c99a600e0a1fec1e87fd19470c2c4cf7c8ce36ed Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Fri, 18 Oct 1996 03:04:55 +0000 Subject: Do not run IP defragmentation routines unneccecarily; NetBSD PR# 2772 --- sys/netinet/ip.h | 1 + sys/netinet/ip_input.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') 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++; -- cgit v1.2.3