version 1.251.2.3, 2008/03/23 02:05:06 |
version 1.254.4.3, 2007/12/27 00:46:29 |
|
|
/* ip_input.c,v 1.251.2.2 2008/01/09 01:57:27 matt Exp */ |
/* $NetBSD$ */ |
|
|
/* |
/* |
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
|
|
*/ |
*/ |
|
|
#include <sys/cdefs.h> |
#include <sys/cdefs.h> |
__KERNEL_RCSID(0, "ip_input.c,v 1.251.2.2 2008/01/09 01:57:27 matt Exp"); |
__KERNEL_RCSID(0, "$NetBSD$"); |
|
|
#include "opt_inet.h" |
#include "opt_inet.h" |
#include "opt_gateway.h" |
#include "opt_gateway.h" |
|
|
for (i = 0; i < IPREASS_NHASH; i++) |
for (i = 0; i < IPREASS_NHASH; i++) |
LIST_INIT(&ipq[i]); |
LIST_INIT(&ipq[i]); |
|
|
ip_initid(); |
|
ip_id = time_second & 0xfffff; |
ip_id = time_second & 0xfffff; |
|
|
ipintrq.ifq_maxlen = ipqmaxlen; |
ipintrq.ifq_maxlen = ipqmaxlen; |
Line 1955 ip_forward(struct mbuf *m, int srcrt) |
|
Line 1954 ip_forward(struct mbuf *m, int srcrt) |
|
type = ICMP_UNREACH; |
type = ICMP_UNREACH; |
code = ICMP_UNREACH_NEEDFRAG; |
code = ICMP_UNREACH_NEEDFRAG; |
#if !defined(IPSEC) && !defined(FAST_IPSEC) |
#if !defined(IPSEC) && !defined(FAST_IPSEC) |
if ((rt = rtcache_validate(&ipforward_rt)) != NULL) |
if ((rt = rtcache_getrt(&ipforward_rt)) != NULL) |
destmtu = rt->rt_ifp->if_mtu; |
destmtu = rt->rt_ifp->if_mtu; |
#else |
#else |
/* |
/* |
Line 1964 ip_forward(struct mbuf *m, int srcrt) |
|
Line 1963 ip_forward(struct mbuf *m, int srcrt) |
|
* tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz |
* tunnel MTU = if MTU - sizeof(IP) - ESP/AH hdrsiz |
* XXX quickhack!!! |
* XXX quickhack!!! |
*/ |
*/ |
if ((rt = rtcache_validate(&ipforward_rt)) != NULL) { |
if ((rt = rtcache_getrt(&ipforward_rt)) != NULL) { |
struct secpolicy *sp; |
struct secpolicy *sp; |
int ipsecerror; |
int ipsecerror; |
size_t ipsechdr; |
size_t ipsechdr; |