diff options
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, | |||
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; |