[PATCH net-next 09/10] batman-adv: correct NET_RX_* NET_XMIT_* confusion
Simon Wunderlich <[email protected]>
| Newsgroups | org.open-mesh.lists.batman,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
From: Sven Eckelmann <[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]> Signed-off-by: Simon Wunderlich <[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 af0543a4d346c..6442f5d0cc937 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; -- 2.47.3