]> git.ipfire.org Git - thirdparty/systemd.git/commit
networkd: Fix race condition in [RoutingPolicyRule] handling (#7615)
authorSaran Tunyasuvunakool <saran@saran.in.th>
Tue, 12 Dec 2017 15:25:36 +0000 (15:25 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Dec 2017 15:25:36 +0000 (16:25 +0100)
commit7715629e9a1b9fa21343468de6bfd80360b415ff
tree11bd233de25632ec8b55c4c1bafa6db140cefbf9
parent4a0e9289bf443fec9fc56af25f90e2a100ba7a41
networkd: Fix race condition in [RoutingPolicyRule] handling (#7615)

The routing policy rule setup logic is moved to the routes setup phase (rather than the addresses setup phase as it is now). Additionally, a call to `link_check_ready` is added to the routing policy rules setup handler. This prevents a race condition with the routes setup handler.

Also give each async handler its own message counter to prevent race conditions when logging successes.

Fixes: #7614
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-routing-policy-rule.c