diff options
author | Tom Herbert <therbert@google.com> | 2013-01-22 10:49:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-23 19:44:00 +0100 |
commit | 055dc21a1d1d219608cd4baac7d0683fb2cbbe8a (patch) | |
tree | 23e66bde4668a92585f62d15c759c53fd4d0892f /net/core/sock.c | |
parent | xen-netback: allow changing the MAC address of the interface (diff) | |
download | linux-055dc21a1d1d219608cd4baac7d0683fb2cbbe8a.tar.xz linux-055dc21a1d1d219608cd4baac7d0683fb2cbbe8a.zip |
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/sock.c')
-rw-r--r-- | net/core/sock.c | 7 |
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, case SO_REUSEADDR: sk->sk_reuse = (valbool ? SK_CAN_REUSE : SK_NO_REUSE); break; + case SO_REUSEPORT: + sk->sk_reuseport = valbool; + break; case SO_TYPE: case SO_PROTOCOL: case SO_DOMAIN: @@ -972,6 +975,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname, v.val = sk->sk_reuse; break; + case SO_REUSEPORT: + v.val = sk->sk_reuseport; + break; + case SO_KEEPALIVE: v.val = sock_flag(sk, SOCK_KEEPOPEN); break; |