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/ip_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.214 retrieving revision 1.219 diff -u -p -r1.214 -r1.219 --- src/sys/netinet/ip_input.c 2005/04/18 21:50:25 1.214 +++ src/sys/netinet/ip_input.c 2005/08/05 09:21:26 1.219 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $ */ +/* $NetBSD: ip_input.c,v 1.219 2005/08/05 09:21:26 elad Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.219 2005/08/05 09:21:26 elad Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -131,6 +131,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_input.c,v #include #include #include +#include #include #include #include @@ -1871,7 +1872,7 @@ ip_forward(struct mbuf *m, int srcrt) rtalloc(&ipforward_rt); if (ipforward_rt.ro_rt == 0) { - icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, dest, 0); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NET, dest, 0); return; } rt = ipforward_rt.ro_rt; @@ -2341,4 +2342,11 @@ SYSCTL_SETUP(sysctl_net_inet_ip_setup, " NULL, 0, &ip_do_loopback_cksum, 0, CTL_NET, PF_INET, IPPROTO_IP, IPCTL_LOOPBACKCKSUM, CTL_EOL); + sysctl_createv(clog, 0, NULL, NULL, + CTLFLAG_PERMANENT, + CTLTYPE_STRUCT, "stats", + SYSCTL_DESCR("IP statistics"), + NULL, 0, &ipstat, sizeof(ipstat), + CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS, + CTL_EOL); }