bpf: fix to bpf_setsockops
authorLawrence Brakmo <brakmo@fb.com>
Sun, 2 Jul 2017 16:14:28 +0000 (09:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Jul 2017 22:16:52 +0000 (15:16 -0700)
Fixed build error due to misplaced "#ifdef CONFIG_INET" (moved 1
statement up).

Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c

index 523b91d2502552d092cbb90e348fa7e9a1f12ca1..e5c280aa5de60575aceb0172f930a84617da34b6 100644 (file)
@@ -2717,9 +2717,9 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
                default:
                        ret = -EINVAL;
                }
+#ifdef CONFIG_INET
        } else if (level == SOL_TCP &&
                   sk->sk_prot->setsockopt == tcp_setsockopt) {
-#ifdef CONFIG_INET
                if (optname == TCP_CONGESTION) {
                        char name[TCP_CA_NAME_MAX];
 
@@ -2757,7 +2757,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
                                ret = -EINVAL;
                        }
                }
-#else
                ret = -EINVAL;
 #endif
        } else {