summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Danilov <littlesmilingcloud@gmail.com>2026-10-05 23:14:17 +0300
committerJakub Kicinski <kuba@kernel.org>2026-10-07 19:45:44 -0700
commitd476bb7c0efd56aa3d579114802305e4500bec85 (patch)
tree755e29b7e2ad9ce7ce0b76d62a2fb2c2965208b3 /include
parent0518c33e1d7e5600e441027100079aaf9c0dda74 (diff)
downloadlinux-d476bb7c0efd56aa3d579114802305e4500bec85.tar.gz
linux-d476bb7c0efd56aa3d579114802305e4500bec85.zip
vxlan: report a circular route as SKB_DROP_REASON_RECURSION_LIMIT
udp_tunnel_dst_lookup() and udp_tunnel6_dst_lookup() return -ELOOP when the route to the remote end goes out of the vxlan device itself, and vxlan_xmit_one() counts that in collisions, apart from the -ENETUNREACH of a failed lookup. The drop reason does not tell them apart: both are reported as SKB_DROP_REASON_IP_OUTNOROUTES, which describes a failed route lookup. Such a route would send the encapsulated packet back into the device it leaves, which is the dead loop on a virtual device that SKB_DROP_REASON_RECURSION_LIMIT describes. Report the -ELOOP case with that reason, and add the tunnel case to the description of the reason as an example. ip_tunnel and ip6_tunnel make the same check, rt->dst.dev == dev in ip_tunnel_xmit() and ip_md_tunnel_xmit() and tdev == dev in ip6_tnl_xmit(), and can report it with the same reason. Signed-off-by: Anton Danilov <littlesmilingcloud@gmail.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261005201417.906344-5-littlesmilingcloud@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/dropreason-core.h6
1 files changed, 5 insertions, 1 deletions
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