]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jan 2019 21:36:43 +0000 (13:36 -0800)
commitf6ed7126ce099246c080968fd76f577e554d4c6b
tree086597ef434e00d35c1ba2f10187680963c4e779
parentf5a89d6b86f61e3e39133697e374d63fe82caaf0
erspan: build the header with the right proto according to erspan_ver

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: f2bf205dab51 ("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>
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c