Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/raw_ip.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.37 retrieving revision 1.37.2.1 diff -u -p -r1.37 -r1.37.2.1 --- src/sys/netinet/raw_ip.c 1997/10/14 00:52:54 1.37 +++ src/sys/netinet/raw_ip.c 1997/11/18 01:04:22 1.37.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.37 1997/10/14 00:52:54 matt Exp $ */ +/* $NetBSD: raw_ip.c,v 1.37.2.1 1997/11/18 01:04:22 mellon Exp $ */ /* * Copyright (c) 1982, 1986, 1988, 1993 @@ -209,6 +209,10 @@ rip_output(m, va_alist) return (EMSGSIZE); } ip = mtod(m, struct ip *); + if (m->m_pkthdr.len != ip->ip_len) { + m_freem(m); + return (EINVAL); + } if (ip->ip_id == 0) ip->ip_id = htons(ip_id++); opts = NULL;