aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2013-01-22 04:49:50 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-23 13:44:00 -0500
commit055dc21a1d1d219608cd4baac7d0683fb2cbbe8a (patch)
tree23e66bde4668a92585f62d15c759c53fd4d0892f /net/core
parent4a633a602c26497b8285a202830829d3be007c7b (diff)
soreuseport: infrastructure
Definitions and macros for implementing soreusport. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 8258fb741e9a..235fb89e8973 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -665,6 +665,9 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
665 case SO_REUSEADDR: 665 case SO_REUSEADDR:
666 sk->sk_reuse = (valbool ? SK_CAN_REUSE : SK_NO_REUSE); 666 sk->sk_reuse = (valbool ? SK_CAN_REUSE : SK_NO_REUSE);
667 break; 667 break;
668 case SO_REUSEPORT:
669 sk->sk_reuseport = valbool;
670 break;
668 case SO_TYPE: 671 case SO_TYPE:
669 case SO_PROTOCOL: 672 case SO_PROTOCOL:
670 case SO_DOMAIN: 673 case SO_DOMAIN:
@@ -972,6 +975,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
972 v.val = sk->sk_reuse; 975 v.val = sk->sk_reuse;
973 break; 976 break;
974 977
978 case SO_REUSEPORT:
979 v.val = sk->sk_reuseport;
980 break;
981
975 case SO_KEEPALIVE: 982 case SO_KEEPALIVE:
976 v.val = sock_flag(sk, SOCK_KEEPOPEN); 983 v.val = sock_flag(sk, SOCK_KEEPOPEN);
977 break; 984 break;