Skip to content

Commit

Permalink
ipv4: frags: precedence bug in ip_expire()
Browse files Browse the repository at this point in the history
We accidentally removed the parentheses here, but they are required
because '!' has higher precedence than '&'.

Fixes: fa0f527 ("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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Aug 6, 2018
1 parent 74c05a3 commit 70837ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ip_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70837ff

Please sign in to comment.