]> git.itanic.dy.fi Git - linux-stable/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)
commit20704bd1633dd5afb29a321d3a615c9c8e9c9d05
tree086597ef434e00d35c1ba2f10187680963c4e779
parent04a4af334b971814eedf4e4a413343ad3287d9a9
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: 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>
net/ipv4/ip_gre.c
net/ipv6/ip6_gre.c