mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-20 19:23:40 +00:00
batman-adv: tvlv: handle negative tvlv processing return codes
batadv_tvlv_containers_process() was implemented with only two return codes from the handlers in mind: * NET_RX_SUCCESS (0) * NET_RX_DROP (1) The multicast handlers broke this convention and are also returning negative return codes. But the processing code was never updated to correctly aggregate them. To handle negative return codes for non-OGM(2) handlers, they are now aggregated to: * NET_RX_SUCCESS when no handlers returned a different return code * the last negative return code when at least one handler returned a negative return code * NET_RX_DROP otherwise With the current callers, the old implementation is not triggering any unexpected behavior. The behavior is only adjusted for new code which might need more reliable return values. Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
0de2765192
commit
e558ee0088
2 changed files with 17 additions and 9 deletions
Loading…
Add table
Add a link
Reference in a new issue