diff options
author | Bill Fenner <fenner@FreeBSD.org> | 1996-10-25 17:57:53 +0000 |
---|---|---|
committer | Bill Fenner <fenner@FreeBSD.org> | 1996-10-25 17:57:53 +0000 |
commit | 430d30d837db3ba56a7c19a55fed18a78728b93f (patch) | |
tree | 3befa5b07bb47bd5b8369c3bd655d60f74ea009c /sys/netinet/ip_var.h | |
parent | 484141f666b97712be121ac82cab0e03052df8c5 (diff) | |
download | src-430d30d837db3ba56a7c19a55fed18a78728b93f.tar.gz src-430d30d837db3ba56a7c19a55fed18a78728b93f.zip |
Don't allow reassembly to create packets bigger than IP_MAXPACKET, and count
attempts to do so.
Don't allow users to source packets bigger than IP_MAXPACKET.
Make UDP length and ipovly's protocol length unsigned short.
Reviewed by: wollman
Submitted by: (partly by) kml@nas.nasa.gov (Kevin Lahey)
Notes
Notes:
svn path=/head/; revision=19183
Diffstat (limited to 'sys/netinet/ip_var.h')
-rw-r--r-- | sys/netinet/ip_var.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index d71008f3a79b..59b3df8795c7 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_var.h 8.2 (Berkeley) 1/9/95 - * $Id: ip_var.h,v 1.22 1996/10/15 16:54:47 bde Exp $ + * $Id: ip_var.h,v 1.23 1996/10/23 18:35:50 wollman Exp $ */ #ifndef _NETINET_IP_VAR_H_ @@ -44,7 +44,7 @@ struct ipovly { caddr_t ih_next, ih_prev; /* for protocol sequence q's */ u_char ih_x1; /* (unused) */ u_char ih_pr; /* protocol */ - short ih_len; /* protocol length */ + u_short ih_len; /* protocol length */ struct in_addr ih_src; /* source internet address */ struct in_addr ih_dst; /* destination internet address */ }; @@ -146,6 +146,7 @@ struct ipstat { u_long ips_noroute; /* packets discarded due to no route */ u_long ips_badvers; /* ip version != 4 */ u_long ips_rawout; /* total raw ip packets generated */ + u_long ips_toolong; /* ip length > max ip packet size */ }; #ifdef KERNEL |