0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-16 18:35:19 +00:00

Babel: Improve clarity of unfeasible update handling.

Add a comment and (unnecessary) check to make correctness obvious.
This commit is contained in:
Ondrej Zajicek 2023-01-30 23:49:20 +01:00
parent 3e7e4a7186
commit 96d7c4679d

View File

@ -1308,9 +1308,10 @@ babel_handle_update(union babel_msg *m, struct babel_iface *ifa)
/*
* RFC section 3.8.2.2 - Dealing with unfeasible updates. Generate a one-off
* (not retransmitted) unicast seqno request to the originator of this update
* (not retransmitted) unicast seqno request to the originator of this update.
* Note: !feasible -> s exists, check for 's' is just for clarity / safety.
*/
if (!feasible && (metric != BABEL_INFINITY) &&
if (!feasible && s && (metric != BABEL_INFINITY) &&
(!best || (r == best) || (metric < best->metric)))
babel_generate_seqno_request(p, e, s->router_id, s->seqno + 1, nbr);