Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6aa7119 authored by William Tu's avatar William Tu Committed by David S. Miller
Browse files

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: default avatarWilliam Tu <u9012063@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b04caab
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {