[PATCH batadv] batman-adv: correct NET_RX_* NET_XMIT_* confusion
Sven Eckelmann <[email protected]> Thu, 30 Jul 2026 08:43:53 +0200
| Newsgroups | org.open-mesh.lists.batman |
|---|---|
| Message-ID | <[email protected]> |
batadv_recv_icmp_ttl_exceeded() is a receive function. It must therefore return NET_RX_* and not NET_XMIT_*. And batadv_send_skb_to_orig() is an xmit function and is returning NET_XMIT_*. This doesn't change the behavior because both NET_RX_SUCCESS and NET_RX_SUCCESS are using the same underlying value (0). Signed-off-by: Sven Eckelmann <[email protected]> --- net/batman-adv/routing.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 15ef47d3..7e093420 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -341,7 +341,7 @@ static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv, * For traceroute-style ICMP echo requests, send a TTL exceeded reply back to * the source. Other ICMP types are simply dropped. * - * Return: NET_XMIT_SUCCESS if the reply was queued, NET_RX_DROP otherwise + * Return: NET_RX_SUCCESS if the reply was queued, NET_RX_DROP otherwise */ static int batadv_recv_icmp_ttl_exceeded(struct batadv_priv *bat_priv, struct sk_buff *skb) @@ -382,8 +382,8 @@ static int batadv_recv_icmp_ttl_exceeded(struct batadv_priv *bat_priv, icmp_packet->ttl = BATADV_TTL; res = batadv_send_skb_to_orig(skb, orig_node, NULL); - if (res == NET_RX_SUCCESS) - ret = NET_XMIT_SUCCESS; + if (res == NET_XMIT_SUCCESS) + ret = NET_RX_SUCCESS; /* skb was consumed */ skb = NULL; --- base-commit: 95b6f66b2659f617ce1937e790f48dc578ee014c change-id: 20260730-rx_xmit_confusion-c7e08c22124e Best regards, -- Sven Eckelmann <[email protected]>