ip6erspan: improve error handling for erspan version number.
authorWilliam Tu <u9012063@gmail.com>
Fri, 9 Mar 2018 15:34:41 +0000 (07:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Mar 2018 18:03:56 +0000 (13:03 -0500)
commitd6aa71197ffcb68850bfebfc3fc160abe41df53b
tree426dd72f36f26419573310a4567c19fa1f29c198
parent3b04caab81649a9e8d5375b919b6653d791951df
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 <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c