gre: fix TUNNEL_SEQ bit check on sequence numbering
The current logic of flags | TUNNEL_SEQ is always non-zero and hence
sequence numbers are always incremented no matter the setting of the
TUNNEL_SEQ bit. Fix this by using & instead of |.
Detected by CoverityScan, CID#1466039 ("Operands don't affect result")
Fixes: 77a5196a ("gre: add sequence number for collect md mode.")
Signed-off-by:
Colin Ian King <colin.king@canonical.com>
Acked-by:
William Tu <u9012063@gmail.com>
Signed-off-by:
David S. Miller <davem@davemloft.net>
Loading
Please register or sign in to comment