ipv4: frags: precedence bug in ip_expire()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Sep 2018 14:58:59 +0000 (07:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:48 +0000 (22:43 +0200)
We accidentally removed the parentheses here, but they are required
because '!' has higher precedence than '&'.

Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 70837ffe3085c9a91488b52ca13ac84424da1042)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_fragment.c

index 0e8f8de..7cb7ed7 100644 (file)
@@ -154,7 +154,7 @@ static void ip_expire(struct timer_list *t)
        __IP_INC_STATS(net, IPSTATS_MIB_REASMFAILS);
        __IP_INC_STATS(net, IPSTATS_MIB_REASMTIMEOUT);
 
-       if (!qp->q.flags & INET_FRAG_FIRST_IN)
+       if (!(qp->q.flags & INET_FRAG_FIRST_IN))
                goto out;
 
        /* sk_buff::dev and sk_buff::rbnode are unionized. So we