• Xin Long's avatar
    ip_gre: get key from session_id correctly in erspan_rcv · 935a9749
    Xin Long authored
    erspan only uses the first 10 bits of session_id as the key to look
    up the tunnel. But in erspan_rcv, it missed 'session_id & ID_MASK'
    when getting the key from session_id.
    
    If any other flag is also set in session_id in a packet, it would
    fail to find the tunnel due to incorrect key in erspan_rcv.
    
    This patch is to add 'session_id & ID_MASK' there and also remove
    the unnecessary variable session_id.
    
    Fixes: 84e54fe0 ("gre: introduce native tunnel support for ERSPAN")
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    935a9749
ip_gre.c 42.1 KB