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.87.2.6 retrieving revision 1.104 diff -u -p -r1.87.2.6 -r1.104 --- src/sys/netinet/raw_ip.c 2007/12/07 17:34:32 1.87.2.6 +++ src/sys/netinet/raw_ip.c 2008/04/07 06:31:28 1.104 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.87.2.6 2007/12/07 17:34:32 yamt Exp $ */ +/* $NetBSD: raw_ip.c,v 1.104 2008/04/07 06:31:28 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.87.2.6 2007/12/07 17:34:32 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.104 2008/04/07 06:31:28 thorpej Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -215,7 +215,7 @@ rip_input(struct mbuf *m, ...) if (last != NULL && ipsec4_in_reject_so(m, last->inp_socket)) { m_freem(m); ipsecstat.in_polvio++; - ipstat.ips_delivered--; + ipstat[IP_STAT_DELIVERED]--; /* do not inject data to pcb */ } else #endif /*IPSEC*/ @@ -224,8 +224,8 @@ rip_input(struct mbuf *m, ...) else if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL, 0, 0); - ipstat.ips_noproto++; - ipstat.ips_delivered--; + ipstat[IP_STAT_NOPROTO]++; + ipstat[IP_STAT_DELIVERED]--; } else m_freem(m); return; @@ -358,12 +358,12 @@ rip_output(struct mbuf *m, ...) } HTONS(ip->ip_len); HTONS(ip->ip_off); - if (ip->ip_id == 0) - ip->ip_id = ip_newid(); + if (ip->ip_id != 0 || m->m_pkthdr.len < IP_MINFRAGSIZE) + flags |= IP_NOIPNEWID; opts = NULL; /* XXX prevent ip_output from overwriting header fields */ flags |= IP_RAWOUTPUT; - ipstat.ips_rawout++; + ipstat[IP_STAT_RAWOUT]++; } return (ip_output(m, opts, &inp->inp_route, flags, inp->inp_moptions, inp->inp_socket, &inp->inp_errormtu));