diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-11-22 04:50:44 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-11-22 04:50:44 +0000 |
commit | a3c1c9fdb4ec0da65e5e02c396bbd5bb22a16c8b (patch) | |
tree | 7e69286bc240807dcaf2ce9e68a4bb59848d76df /sys/netinet/tcp_usrreq.c | |
parent | 7e4737a17a89fe0f71b6b62c33f5cb8b254ddbd8 (diff) | |
download | FreeBSD-src-a3c1c9fdb4ec0da65e5e02c396bbd5bb22a16c8b.zip FreeBSD-src-a3c1c9fdb4ec0da65e5e02c396bbd5bb22a16c8b.tar.gz |
Introduce a syncache, which enables FreeBSD to withstand a SYN flood
DoS in an improved fashion over the existing code.
Reviewed by: silby (in a previous iteration)
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 2485a91..e3a35d7 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -765,7 +765,7 @@ tcp_connect(tp, nam, td) * Generate a CC value for this connection and * check whether CC or CCnew should be used. */ - if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) { + if ((taop = tcp_gettaocache(&tp->t_inpcb->inp_inc)) == NULL) { taop = &tao_noncached; bzero(taop, sizeof(*taop)); } @@ -851,7 +851,7 @@ tcp6_connect(tp, nam, td) * Generate a CC value for this connection and * check whether CC or CCnew should be used. */ - if ((taop = tcp_gettaocache(tp->t_inpcb)) == NULL) { + if ((taop = tcp_gettaocache(&tp->t_inpcb->inp_inc)) == NULL) { taop = &tao_noncached; bzero(taop, sizeof(*taop)); } |