]> www.infradead.org Git - users/dwmw2/linux.git/commit
erspan: build the header with the right proto according to erspan_ver
authorXin Long <lucien.xin@gmail.com>
Mon, 14 Jan 2019 10:10:06 +0000 (18:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 07:15:34 +0000 (08:15 +0100)
commit4e0a44cc57d3937b84ba7c1e82d08665d46662c5
treeac0ff487a35de3ffbf58135a45d7ad8a935e69f7
parent97521b30c1da70c146a5d9a124261a408d4a3b73
erspan: build the header with the right proto according to erspan_ver

[ Upstream commit 20704bd1633dd5afb29a321d3a615c9c8e9c9d05 ]

As said in draft-foschiano-erspan-03#section4:

   Different frame variants known as "ERSPAN Types" can be
   distinguished based on the GRE "Protocol Type" field value: Type I
   and II's value is 0x88BE while Type III's is 0x22EB [ETYPES].

So set it properly in erspan_xmit() according to erspan_ver. While at
it, also remove the unused parameter 'proto' in erspan_fb_xmit().

Fixes: 94d7d8f29287 ("ip6_gre: add erspan v2 support")
Reported-by: Jianlin Shi <jishi@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c