git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net: guard tcp_set_keepalive() to tcp sockets
[pandora-kernel.git]
/
net
/
core
/
sock.c
diff --git
a/net/core/sock.c
b/net/core/sock.c
index
018fd41
..
1e8a882
100644
(file)
--- a/
net/core/sock.c
+++ b/
net/core/sock.c
@@
-593,7
+593,8
@@
set_rcvbuf:
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);