Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c4519d3c
Commit
c4519d3c
authored
Jun 11, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/net-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
be76fffc
5d746e6a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
22 deletions
+22
-22
include/net/sock.h
include/net/sock.h
+15
-0
include/net/tcp.h
include/net/tcp.h
+1
-16
net/ipv4/tcp.c
net/ipv4/tcp.c
+2
-2
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+2
-2
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+2
-2
No files found.
include/net/sock.h
View file @
c4519d3c
...
...
@@ -398,6 +398,21 @@ static inline int sock_flag(struct sock *sk, enum sock_flags flag)
return
test_bit
(
flag
,
&
sk
->
sk_flags
);
}
static
inline
void
sk_acceptq_removed
(
struct
sock
*
sk
)
{
sk
->
sk_ack_backlog
--
;
}
static
inline
void
sk_acceptq_added
(
struct
sock
*
sk
)
{
sk
->
sk_ack_backlog
++
;
}
static
inline
int
sk_acceptq_is_full
(
struct
sock
*
sk
)
{
return
sk
->
sk_ack_backlog
>
sk
->
sk_max_ack_backlog
;
}
/* The per-socket spinlock must be held here. */
#define sk_add_backlog(__sk, __skb) \
do { if (!(__sk)->sk_backlog.tail) { \
...
...
include/net/tcp.h
View file @
c4519d3c
...
...
@@ -1794,28 +1794,13 @@ static inline int tcp_full_space( struct sock *sk)
return
tcp_win_from_space
(
sk
->
sk_rcvbuf
);
}
static
inline
void
tcp_acceptq_removed
(
struct
sock
*
sk
)
{
sk
->
sk_ack_backlog
--
;
}
static
inline
void
tcp_acceptq_added
(
struct
sock
*
sk
)
{
sk
->
sk_ack_backlog
++
;
}
static
inline
int
tcp_acceptq_is_full
(
struct
sock
*
sk
)
{
return
sk
->
sk_ack_backlog
>
sk
->
sk_max_ack_backlog
;
}
static
inline
void
tcp_acceptq_queue
(
struct
sock
*
sk
,
struct
open_request
*
req
,
struct
sock
*
child
)
{
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
req
->
sk
=
child
;
tcp
_acceptq_added
(
sk
);
sk
_acceptq_added
(
sk
);
if
(
!
tp
->
accept_queue_tail
)
{
tp
->
accept_queue
=
req
;
...
...
net/ipv4/tcp.c
View file @
c4519d3c
...
...
@@ -648,7 +648,7 @@ static void tcp_listen_stop (struct sock *sk)
local_bh_enable
();
sock_put
(
child
);
tcp
_acceptq_removed
(
sk
);
sk
_acceptq_removed
(
sk
);
tcp_openreq_fastfree
(
req
);
}
BUG_TRAP
(
!
sk
->
sk_ack_backlog
);
...
...
@@ -2225,7 +2225,7 @@ struct sock *tcp_accept(struct sock *sk, int flags, int *err)
tp
->
accept_queue_tail
=
NULL
;
newsk
=
req
->
sk
;
tcp
_acceptq_removed
(
sk
);
sk
_acceptq_removed
(
sk
);
tcp_openreq_fastfree
(
req
);
BUG_TRAP
(
newsk
->
sk_state
!=
TCP_SYN_RECV
);
release_sock
(
sk
);
...
...
net/ipv4/tcp_ipv4.c
View file @
c4519d3c
...
...
@@ -1442,7 +1442,7 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
* clogging syn queue with openreqs with exponentially increasing
* timeout.
*/
if
(
tcp
_acceptq_is_full
(
sk
)
&&
tcp_synq_young
(
sk
)
>
1
)
if
(
sk
_acceptq_is_full
(
sk
)
&&
tcp_synq_young
(
sk
)
>
1
)
goto
drop
;
req
=
tcp_openreq_alloc
();
...
...
@@ -1567,7 +1567,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
struct
tcp_opt
*
newtp
;
struct
sock
*
newsk
;
if
(
tcp
_acceptq_is_full
(
sk
))
if
(
sk
_acceptq_is_full
(
sk
))
goto
exit_overflow
;
if
(
!
dst
&&
(
dst
=
tcp_v4_route_req
(
sk
,
req
))
==
NULL
)
...
...
net/ipv6/tcp_ipv6.c
View file @
c4519d3c
...
...
@@ -1182,7 +1182,7 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
goto
drop
;
}
if
(
tcp
_acceptq_is_full
(
sk
)
&&
tcp_synq_young
(
sk
)
>
1
)
if
(
sk
_acceptq_is_full
(
sk
)
&&
tcp_synq_young
(
sk
)
>
1
)
goto
drop
;
req
=
tcp_openreq_alloc
();
...
...
@@ -1299,7 +1299,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
opt
=
np
->
opt
;
if
(
tcp
_acceptq_is_full
(
sk
))
if
(
sk
_acceptq_is_full
(
sk
))
goto
out_overflow
;
if
(
np
->
rxopt
.
bits
.
srcrt
==
2
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment