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 retrieving revision 1.219.2.2 retrieving revision 1.220 diff -u -p -r1.219.2.2 -r1.220 --- src/sys/netinet/ip_input.c 2005/11/02 11:58:11 1.219.2.2 +++ src/sys/netinet/ip_input.c 2005/10/23 18:38:53 1.220 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.219.2.2 2005/11/02 11:58:11 yamt Exp $ */ +/* $NetBSD: ip_input.c,v 1.220 2005/10/23 18:38:53 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -98,7 +98,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.219.2.2 2005/11/02 11:58:11 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.220 2005/10/23 18:38:53 christos Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -1853,6 +1853,7 @@ ip_forward(struct mbuf *m, int srcrt) icmp_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, dest, 0); return; } + ip->ip_ttl -= IPTTLDEC; sin = satosin(&ipforward_rt.ro_dst); if ((rt = ipforward_rt.ro_rt) == 0 || @@ -1882,8 +1883,6 @@ ip_forward(struct mbuf *m, int srcrt) if (mcopy) mcopy = m_pullup(mcopy, ip->ip_hl << 2); - ip->ip_ttl -= IPTTLDEC; - /* * If forwarding packet using same interface that it came in on, * perhaps should send a redirect to sender to shortcut a hop.