diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-04-17 19:42:54 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-04-17 20:08:07 +0200 |
commit | 8203c7ce4ef2840929d38b447b4ccd384727f92b (patch) | |
tree | 07b4079057e035a4063788f120665f5e42967e8e /drivers/net/geneve.c | |
parent | Merge branch 'mptcp-fixes-and-tracepoints' (diff) | |
parent | Merge tag 'net-5.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
download | linux-8203c7ce4ef2840929d38b447b4ccd384727f92b.tar.xz linux-8203c7ce4ef2840929d38b447b4ccd384727f92b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
- keep the ZC code, drop the code related to reinit
net/bridge/netfilter/ebtables.c
- fix build after move to net_generic
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/geneve.c')
-rw-r--r-- | drivers/net/geneve.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index e3b2375ac5eb..072de880b99f 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -892,6 +892,9 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev, __be16 sport; int err; + if (!pskb_network_may_pull(skb, sizeof(struct iphdr))) + return -EINVAL; + sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true); rt = geneve_get_v4_rt(skb, dev, gs4, &fl4, info, geneve->cfg.info.key.tp_dst, sport); @@ -986,6 +989,9 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev, __be16 sport; int err; + if (!pskb_network_may_pull(skb, sizeof(struct ipv6hdr))) + return -EINVAL; + sport = udp_flow_src_port(geneve->net, skb, 1, USHRT_MAX, true); dst = geneve_get_v6_dst(skb, dev, gs6, &fl6, info, geneve->cfg.info.key.tp_dst, sport); |