network: do not reconfigure interface when the link gains carrier but udev not initia...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Dec 2020 03:15:45 +0000 (12:15 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Dec 2020 13:31:40 +0000 (14:31 +0100)
commitf375c8cbb581e8b0858dff736f34f603e5f77848
tree576d7a5c9671c7599c8b14f22d1609bc824e8229
parent5d4909decf171c437fe816d2c5265d17d7ded75d
network: do not reconfigure interface when the link gains carrier but udev not initialized it yet

When an interface gains carrier but udev have not initialized the
interface or link_initialized_handler() has not been called yet,
then link_configure will be called twice. Thus LLDP client will be
configured twice, and triggers assertion.

Fixes #17929.

(cherry picked from commit 8bceafa7771800c8bdfc1b74ef39824103f5c129)
src/network/networkd-link-bus.c
src/network/networkd-link.c