Revert "geneve: Fix incorrect inner network header offset when innerprotoinherit is set"
This reverts commit 08dc6b0262
.
This commit is contained in:
parent
f09a4f8481
commit
05b6109631
2 changed files with 6 additions and 9 deletions
|
@ -912,7 +912,6 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
struct geneve_dev *geneve,
|
||||
const struct ip_tunnel_info *info)
|
||||
{
|
||||
bool inner_proto_inherit = geneve->cfg.inner_proto_inherit;
|
||||
bool xnet = !net_eq(geneve->net, dev_net(geneve->dev));
|
||||
struct geneve_sock *gs4 = rcu_dereference(geneve->sock4);
|
||||
const struct ip_tunnel_key *key = &info->key;
|
||||
|
@ -924,7 +923,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
__be16 sport;
|
||||
int err;
|
||||
|
||||
if (!skb_vlan_inet_prepare(skb, inner_proto_inherit))
|
||||
if (!skb_vlan_inet_prepare(skb))
|
||||
return -EINVAL;
|
||||
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
|
@ -997,7 +996,7 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
}
|
||||
|
||||
err = geneve_build_skb(&rt->dst, skb, info, xnet, sizeof(struct iphdr),
|
||||
inner_proto_inherit);
|
||||
geneve->cfg.inner_proto_inherit);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
|
@ -1013,7 +1012,6 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
struct geneve_dev *geneve,
|
||||
const struct ip_tunnel_info *info)
|
||||
{
|
||||
bool inner_proto_inherit = geneve->cfg.inner_proto_inherit;
|
||||
bool xnet = !net_eq(geneve->net, dev_net(geneve->dev));
|
||||
struct geneve_sock *gs6 = rcu_dereference(geneve->sock6);
|
||||
const struct ip_tunnel_key *key = &info->key;
|
||||
|
@ -1023,7 +1021,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
__be16 sport;
|
||||
int err;
|
||||
|
||||
if (!skb_vlan_inet_prepare(skb, inner_proto_inherit))
|
||||
if (!skb_vlan_inet_prepare(skb))
|
||||
return -EINVAL;
|
||||
|
||||
sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true);
|
||||
|
@ -1078,7 +1076,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
|
|||
ttl = ttl ? : ip6_dst_hoplimit(dst);
|
||||
}
|
||||
err = geneve_build_skb(dst, skb, info, xnet, sizeof(struct ipv6hdr),
|
||||
inner_proto_inherit);
|
||||
geneve->cfg.inner_proto_inherit);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
|
||||
|
|
|
@ -342,10 +342,9 @@ static inline bool pskb_inet_may_pull(struct sk_buff *skb)
|
|||
|
||||
/* Variant of pskb_inet_may_pull().
|
||||
*/
|
||||
static inline bool skb_vlan_inet_prepare(struct sk_buff *skb,
|
||||
bool inner_proto_inherit)
|
||||
static inline bool skb_vlan_inet_prepare(struct sk_buff *skb)
|
||||
{
|
||||
int nhlen = 0, maclen = inner_proto_inherit ? 0 : ETH_HLEN;
|
||||
int nhlen = 0, maclen = ETH_HLEN;
|
||||
__be16 type = skb->protocol;
|
||||
|
||||
/* Essentially this is skb_protocol(skb, true)
|
||||
|
|
Loading…
Add table
Reference in a new issue