version 1.221, 2005/11/01 21:21:09 |
version 1.223.6.3, 2006/06/01 22:38:47 |
Line 279 static u_int ip_reass_ttl_decr(u_int tic |
|
Line 279 static u_int ip_reass_ttl_decr(u_int tic |
|
static void ip_reass_drophalf(void); |
static void ip_reass_drophalf(void); |
|
|
|
|
static __inline int ipq_lock_try(void); |
static inline int ipq_lock_try(void); |
static __inline void ipq_unlock(void); |
static inline void ipq_unlock(void); |
|
|
static __inline int |
static inline int |
ipq_lock_try(void) |
ipq_lock_try(void) |
{ |
{ |
int s; |
int s; |
Line 301 ipq_lock_try(void) |
|
Line 301 ipq_lock_try(void) |
|
return (1); |
return (1); |
} |
} |
|
|
static __inline void |
static inline void |
ipq_unlock(void) |
ipq_unlock(void) |
{ |
{ |
int s; |
int s; |
|
|
for (i = 0; i < IPREASS_NHASH; i++) |
for (i = 0; i < IPREASS_NHASH; i++) |
LIST_INIT(&ipq[i]); |
LIST_INIT(&ipq[i]); |
|
|
ip_id = time.tv_sec & 0xfffff; |
ip_id = time_second & 0xfffff; |
|
|
ipintrq.ifq_maxlen = ipqmaxlen; |
ipintrq.ifq_maxlen = ipqmaxlen; |
ip_nmbclusters_changed(); |
ip_nmbclusters_changed(); |
Line 732 ip_input(struct mbuf *m) |
|
Line 732 ip_input(struct mbuf *m) |
|
} |
} |
if (ia != NULL) |
if (ia != NULL) |
goto ours; |
goto ours; |
if (m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { |
if (m->m_pkthdr.rcvif && m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { |
IFADDR_FOREACH(ifa, m->m_pkthdr.rcvif) { |
IFADDR_FOREACH(ifa, m->m_pkthdr.rcvif) { |
if (ifa->ifa_addr->sa_family != AF_INET) |
if (ifa->ifa_addr->sa_family != AF_INET) |
continue; |
continue; |
|
|
goto bad; |
goto bad; |
} |
} |
#endif |
#endif |
#if FAST_IPSEC |
#ifdef FAST_IPSEC |
/* |
/* |
* enforce IPsec policy checking if we are seeing last header. |
* enforce IPsec policy checking if we are seeing last header. |
* note that we do not visit this with protocols with pcb layer |
* note that we do not visit this with protocols with pcb layer |
Line 1839 ip_forward(struct mbuf *m, int srcrt) |
|
Line 1839 ip_forward(struct mbuf *m, int srcrt) |
|
|
|
dest = 0; |
dest = 0; |
#ifdef DIAGNOSTIC |
#ifdef DIAGNOSTIC |
if (ipprintfs) |
if (ipprintfs) { |
printf("forward: src %2.2x dst %2.2x ttl %x\n", |
printf("forward: src %s ", inet_ntoa(ip->ip_src)); |
ntohl(ip->ip_src.s_addr), |
printf("dst %s ttl %x\n", inet_ntoa(ip->ip_dst), ip->ip_ttl); |
ntohl(ip->ip_dst.s_addr), ip->ip_ttl); |
} |
#endif |
#endif |
if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) { |
if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) { |
ipstat.ips_cantforward++; |
ipstat.ips_cantforward++; |