diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 1144900d37f6dbd6b91b19e307770db265d9c18c..d60fd7321e6363f98a1c09bbfb2a3cc7d9853415 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -305,7 +305,7 @@ static int inet_create(struct socket *sock, int protocol) sk->sk_reuse = 1; inet = inet_sk(sk); - inet->is_icsk = INET_PROTOSW_ICSK & answer_flags; + inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) == INET_PROTOSW_ICSK; if (SOCK_RAW == sock->type) { inet->num = protocol; diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index e5cd83b2205d41e9a2689224b12d4d8dbfaec2e9..832a5e6e2d7e6270808bbfc70a26eddba49250a6 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -171,7 +171,7 @@ static int inet6_create(struct socket *sock, int protocol) sk->sk_reuse = 1; inet = inet_sk(sk); - inet->is_icsk = INET_PROTOSW_ICSK & answer_flags; + inet->is_icsk = (INET_PROTOSW_ICSK & answer_flags) == INET_PROTOSW_ICSK; if (SOCK_RAW == sock->type) { inet->num = protocol;