]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ipv4: frags: precedence bug in ip_expire()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 6 Aug 2018 19:17:35 +0000 (22:17 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Aug 2018 20:15:12 +0000 (13:15 -0700)
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>
net/ipv4/ip_fragment.c

index 0e8f8de77e710ce4faa964734fb6ccaef90f9bff..7cb7ed761d8cfce186dc3b753ecc6ca4e45ef88f 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