diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 3e7a3e64a83b..278d41f58d89 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -2541,7 +2541,10 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, tos, use_cache ? dst_cache : NULL); if (IS_ERR(rt)) { err = PTR_ERR(rt); - reason = SKB_DROP_REASON_IP_OUTNOROUTES; + if (err == -ELOOP) + reason = SKB_DROP_REASON_RECURSION_LIMIT; + else + reason = SKB_DROP_REASON_IP_OUTNOROUTES; goto tx_error; } @@ -2627,7 +2630,10 @@ void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, if (IS_ERR(ndst)) { err = PTR_ERR(ndst); ndst = NULL; - reason = SKB_DROP_REASON_IP_OUTNOROUTES; + if (err == -ELOOP) + reason = SKB_DROP_REASON_RECURSION_LIMIT; + else + reason = SKB_DROP_REASON_IP_OUTNOROUTES; goto tx_error; } diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h index 40a27d8887af..664249924219 100644 --- a/include/net/dropreason-core.h +++ b/include/net/dropreason-core.h @@ -613,7 +613,11 @@ enum skb_drop_reason { SKB_DROP_REASON_PSP_INPUT, /** @SKB_DROP_REASON_PSP_OUTPUT: PSP output checks failed */ SKB_DROP_REASON_PSP_OUTPUT, - /** @SKB_DROP_REASON_RECURSION_LIMIT: Dead loop on virtual device. */ + /** + * @SKB_DROP_REASON_RECURSION_LIMIT: Dead loop on virtual device, e.g. a + * tunnel whose route to its remote end goes out of the tunnel device + * itself. + */ SKB_DROP_REASON_RECURSION_LIMIT, /** * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which