vxlan_rcv() reports SKB_DROP_REASON_NOMEM whenever __iptunnel_pull_header() fails, as the helper used to return -ENOMEM for any failure. The VXLAN header is already in the linear area at this point, but the inner Ethernet header of a packet without GPE may not be, so a packet whose inner frame is shorter than an Ethernet header is reported as an out of memory condition. Report the reason __iptunnel_pull_header() now returns instead: PKT_TOO_SMALL for such a packet, NOMEM when an allocation fails. Suggested-by: Ido Schimmel Assisted-by: LLM Signed-off-by: Anton Danilov --- drivers/net/vxlan/vxlan_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 35a47cc27200..0d98e29e2d72 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -1743,11 +1743,11 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) raw_proto = true; } - if (__iptunnel_pull_header(skb, VXLAN_HLEN, protocol, raw_proto, - !net_eq(vxlan->net, dev_net(vxlan->dev)))) { - reason = SKB_DROP_REASON_NOMEM; + reason = __iptunnel_pull_header(skb, VXLAN_HLEN, protocol, raw_proto, + !net_eq(vxlan->net, + dev_net(vxlan->dev))); + if (reason) goto drop; - } if (cfg->flags & VXLAN_F_REMCSUM_RX) { reason = vxlan_remcsum(skb, cfg->flags); -- 2.47.3