Project

General

Profile

Actions

Bug #456

open

tvlv: Unicast packets with unknown TVLV are not forwarded

Added by Sven Eckelmann 11 days ago.

Status:
New
Priority:
Normal
Target version:
-
Start date:
07/30/2026
Due date:
% Done:

0%

Estimated time:

Description

If batadv_recv_unicast_tvlv receives a packet (for a different node) with an unknown TVLV, batadv_tvlv_containers_process will always return NET_RX_SUCCESS because batadv_tvlv_call_handler was called without a tvlv_handler.

This is handled by batadv_recv_unicast_tvlv like it should not forward it to its actual destination:

    ret = batadv_tvlv_containers_process(bat_priv, BATADV_UNICAST_TVLV,
                         NULL, skb, tvlv_buff,
                         tvlv_buff_len);

    if (ret != NET_RX_SUCCESS) {
        ret = batadv_route_unicast_packet(skb, recv_if);
        /* skb was consumed */
        skb = NULL;
    }

In general: tt is rather odd how the inner code (like in batadv_tt_tvlv_unicast_handler_v1 and batadv_roam_tvlv_unicast_handler_v1) try to misuse a single return code for all TVLVs to decide what has to happen with the overall packet with multiple TVLVs.

No data to display

Actions

Also available in: Atom PDF