Skip to content

Commit

Permalink
ip6erspan: improve error handling for erspan version number.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
williamtu authored and davem330 committed Mar 9, 2018
1 parent 3b04caa commit d6aa711
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv6/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
md->u.md2.dir,
get_hwid(&md->u.md2),
truncate, false);
} else {
goto tx_err;
}
} else {
switch (skb->protocol) {
Expand Down

0 comments on commit d6aa711

Please sign in to comment.