• Gavrilov Ilia's avatar
    net: pktgen: Fix interface flags printing · 1d30162f
    Gavrilov Ilia authored
    Device flags are displayed incorrectly:
    1) The comparison (i == F_FLOW_SEQ) is always false, because F_FLOW_SEQ
    is equal to (1 << FLOW_SEQ_SHIFT) == 2048, and the maximum value
    of the 'i' variable is (NR_PKT_FLAG - 1) == 17. It should be compared
    with FLOW_SEQ_SHIFT.
    
    2) Similarly to the F_IPSEC flag.
    
    3) Also add spaces to the print end of the string literal "spi:%u"
    to prevent the output from merging with the flag that follows.
    
    Found by InfoTeCS on behalf of Linux Verification Center
    (linuxtesting.org) with SVACE.
    
    Fixes: 99c6d3d2 ("pktgen: Remove brute-force printing of flags")
    Signed-off-by: default avatarGavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1d30162f
pktgen.c 99.1 KB