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.272.2.2 retrieving revision 1.273 diff -u -p -r1.272.2.2 -r1.273 --- src/sys/netinet/ip_input.c 2008/10/10 22:35:43 1.272.2.2 +++ src/sys/netinet/ip_input.c 2008/08/20 18:35:20 1.273 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.272.2.2 2008/10/10 22:35:43 skrll Exp $ */ +/* $NetBSD: ip_input.c,v 1.273 2008/08/20 18:35:20 matt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.272.2.2 2008/10/10 22:35:43 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.273 2008/08/20 18:35:20 matt Exp $"); #include "opt_inet.h" #include "opt_gateway.h" @@ -330,8 +330,10 @@ do { \ #define IPQ_UNLOCK() ipq_unlock() -struct pool inmulti_pool; -struct pool ipqent_pool; +POOL_INIT(inmulti_pool, sizeof(struct in_multi), 0, 0, 0, "inmltpl", NULL, + IPL_SOFTNET); +POOL_INIT(ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl", NULL, + IPL_VM); #ifdef INET_CSUM_COUNTERS #include @@ -397,11 +399,6 @@ ip_init(void) const struct protosw *pr; int i; - pool_init(&inmulti_pool, sizeof(struct in_multi), 0, 0, 0, "inmltpl", - NULL, IPL_SOFTNET); - pool_init(&ipqent_pool, sizeof(struct ipqent), 0, 0, 0, "ipqepl", - NULL, IPL_VM); - pr = pffindproto(PF_INET, IPPROTO_RAW, SOCK_RAW); if (pr == 0) panic("ip_init"); @@ -1970,11 +1967,9 @@ ip_forward(struct mbuf *m, int srcrt) type = ICMP_UNREACH; code = ICMP_UNREACH_NEEDFRAG; - if ((rt = rtcache_validate(&ipforward_rt)) != NULL) - destmtu = rt->rt_ifp->if_mtu; + if ((rt = rtcache_validate(&ipforward_rt)) != NULL) { #if defined(IPSEC) || defined(FAST_IPSEC) - { /* * If the packet is routed over IPsec tunnel, tell the * originator the tunnel MTU. @@ -1990,7 +1985,10 @@ ip_forward(struct mbuf *m, int srcrt) sp = ipsec4_getpolicybyaddr(mcopy, IPSEC_DIR_OUTBOUND, IP_FORWARDING, &ipsecerror); +#endif + destmtu = rt->rt_ifp->if_mtu; +#if defined(IPSEC) || defined(FAST_IPSEC) if (sp != NULL) { /* count IPsec header size */ ipsechdr = ipsec4_hdrsiz(mcopy, @@ -2005,7 +2003,6 @@ ip_forward(struct mbuf *m, int srcrt) && sp->req->sav != NULL && sp->req->sav->sah != NULL) { ro = &sp->req->sav->sah->sa_route; - rt = rtcache_validate(ro); if (rt && rt->rt_ifp) { destmtu = rt->rt_rmx.rmx_mtu ? @@ -2021,8 +2018,8 @@ ip_forward(struct mbuf *m, int srcrt) KEY_FREESP(&sp); #endif } - } #endif /*defined(IPSEC) || defined(FAST_IPSEC)*/ + } IP_STATINC(IP_STAT_CANTFRAG); break;