Skip to content

Commit

Permalink
ip6erspan: improve error handling for erspan version number.
Browse files Browse the repository at this point in the history
Upstream commit:
    commit d6aa71197ffcb68850bfebfc3fc160abe41df53b
    Author: William Tu <[email protected]>
    Date:   Fri Mar 9 07:34:41 2018 -0800

    ip6erspan: improve error handling for erspan version number.

    When users fill in incorrect erspan version number through
    the struct erspan_metadata uapi, current code skips pushing
    the erspan header but continue pushing the gre header, which
    is incorrect.  The patch fixes it by returning error.

    Signed-off-by: William Tu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>

Cc: William Tu <[email protected]>
Signed-off-by: Greg Rose <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: William Tu <[email protected]>
  • Loading branch information
williamtu authored and blp committed May 22, 2018
1 parent 753f9bc commit 8dc47fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datapath/linux/compat/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
truncate, false);
tpi.hdr_len = ERSPAN_V2_MDSIZE;
tpi.proto = htons(ETH_P_ERSPAN2);
} else {
goto tx_err;
}

tpi.flags = TUNNEL_SEQ;
Expand Down

0 comments on commit 8dc47fb

Please sign in to comment.