Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323164
b: refs/heads/master
c: 3e10986
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 24, 2012
1 parent 3edb30a commit 41aa5bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69190e67d4fac49e2f6ea22f46780d0c712214b8
refs/heads/master: 3e10986d1d698140747fcfc2761ec9cb64c1d582
3 changes: 2 additions & 1 deletion trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@ int sock_setsockopt(struct socket *sock, int level, int optname,

case SO_KEEPALIVE:
#ifdef CONFIG_INET
if (sk->sk_protocol == IPPROTO_TCP)
if (sk->sk_protocol == IPPROTO_TCP &&
sk->sk_type == SOCK_STREAM)
tcp_set_keepalive(sk, valbool);
#endif
sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool);
Expand Down

0 comments on commit 41aa5bf

Please sign in to comment.