• Jiri Benc's avatar
    vxlan: clean up rx error path · 288b01c8
    Jiri Benc authored
    When there are unrecognized flags present in the vxlan header, it doesn't
    make much sense to return the packet for further UDP processing, especially
    considering that for other invalid flag combinations we drop the packet
    because of previous checks.
    
    This means we return positive value only at the beginning of the function
    where tun_dst is not yet allocated. This allows us to get rid of the
    bad_flags and error jump labels.
    
    When we're dropping packet, we need to free tun_dst now.
    Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    288b01c8
vxlan.c 80.3 KB