| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: tcp_input.c,v 1.292 2009/01/29 20:38:22 pooka Exp $ */ | | 1 | /* $NetBSD: tcp_input.c,v 1.293 2009/03/15 21:25:32 cegger Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -135,27 +135,27 @@ | | | @@ -135,27 +135,27 @@ |
135 | */ | | 135 | */ |
136 | | | 136 | |
137 | /* | | 137 | /* |
138 | * TODO list for SYN cache stuff: | | 138 | * TODO list for SYN cache stuff: |
139 | * | | 139 | * |
140 | * Find room for a "state" field, which is needed to keep a | | 140 | * Find room for a "state" field, which is needed to keep a |
141 | * compressed state for TIME_WAIT TCBs. It's been noted already | | 141 | * compressed state for TIME_WAIT TCBs. It's been noted already |
142 | * that this is fairly important for very high-volume web and | | 142 | * that this is fairly important for very high-volume web and |
143 | * mail servers, which use a large number of short-lived | | 143 | * mail servers, which use a large number of short-lived |
144 | * connections. | | 144 | * connections. |
145 | */ | | 145 | */ |
146 | | | 146 | |
147 | #include <sys/cdefs.h> | | 147 | #include <sys/cdefs.h> |
148 | __KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.292 2009/01/29 20:38:22 pooka Exp $"); | | 148 | __KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.293 2009/03/15 21:25:32 cegger Exp $"); |
149 | | | 149 | |
150 | #include "opt_inet.h" | | 150 | #include "opt_inet.h" |
151 | #include "opt_ipsec.h" | | 151 | #include "opt_ipsec.h" |
152 | #include "opt_inet_csum.h" | | 152 | #include "opt_inet_csum.h" |
153 | #include "opt_tcp_debug.h" | | 153 | #include "opt_tcp_debug.h" |
154 | | | 154 | |
155 | #include <sys/param.h> | | 155 | #include <sys/param.h> |
156 | #include <sys/systm.h> | | 156 | #include <sys/systm.h> |
157 | #include <sys/malloc.h> | | 157 | #include <sys/malloc.h> |
158 | #include <sys/mbuf.h> | | 158 | #include <sys/mbuf.h> |
159 | #include <sys/protosw.h> | | 159 | #include <sys/protosw.h> |
160 | #include <sys/socket.h> | | 160 | #include <sys/socket.h> |
161 | #include <sys/socketvar.h> | | 161 | #include <sys/socketvar.h> |
| @@ -397,27 +397,27 @@ static void tcp4_log_refused(const struc | | | @@ -397,27 +397,27 @@ static void tcp4_log_refused(const struc |
397 | #ifdef INET6 | | 397 | #ifdef INET6 |
398 | static void tcp6_log_refused(const struct ip6_hdr *, const struct tcphdr *); | | 398 | static void tcp6_log_refused(const struct ip6_hdr *, const struct tcphdr *); |
399 | #endif | | 399 | #endif |
400 | | | 400 | |
401 | #define TRAVERSE(x) while ((x)->m_next) (x) = (x)->m_next | | 401 | #define TRAVERSE(x) while ((x)->m_next) (x) = (x)->m_next |
402 | | | 402 | |
403 | #if defined(MBUFTRACE) | | 403 | #if defined(MBUFTRACE) |
404 | struct mowner tcp_reass_mowner = MOWNER_INIT("tcp", "reass"); | | 404 | struct mowner tcp_reass_mowner = MOWNER_INIT("tcp", "reass"); |
405 | #endif /* defined(MBUFTRACE) */ | | 405 | #endif /* defined(MBUFTRACE) */ |
406 | | | 406 | |
407 | static struct pool tcpipqent_pool; | | 407 | static struct pool tcpipqent_pool; |
408 | | | 408 | |
409 | void | | 409 | void |
410 | tcpipqent_init() | | 410 | tcpipqent_init(void) |
411 | { | | 411 | { |
412 | | | 412 | |
413 | pool_init(&tcpipqent_pool, sizeof(struct ipqent), 0, 0, 0, "tcpipqepl", | | 413 | pool_init(&tcpipqent_pool, sizeof(struct ipqent), 0, 0, 0, "tcpipqepl", |
414 | NULL, IPL_VM); | | 414 | NULL, IPL_VM); |
415 | } | | 415 | } |
416 | | | 416 | |
417 | struct ipqent * | | 417 | struct ipqent * |
418 | tcpipqent_alloc(void) | | 418 | tcpipqent_alloc(void) |
419 | { | | 419 | { |
420 | struct ipqent *ipqe; | | 420 | struct ipqent *ipqe; |
421 | int s; | | 421 | int s; |
422 | | | 422 | |
423 | s = splvm(); | | 423 | s = splvm(); |