system-linux: add retry for adding member devices to a bridge
authorFelix Fietkau <nbd@nbd.name>
Mon, 23 Nov 2020 11:42:36 +0000 (12:42 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 23 Nov 2020 11:48:53 +0000 (12:48 +0100)
commit3abe1fc87151fae570fc1232053c73d1a5505664
tree386eaa0a331e01a289b0cba79b01a052ceeb9406
parent213748a9bcd9683778250e3673b70acdcc8d96a2
system-linux: add retry for adding member devices to a bridge

When netifd tries to add bridge members brought up by hostapd asynchronously
(e.g. after an autochannel run), the first try often fails with EBUSY or
EAGAIN, since it's racing against hostapd's own setup.
Add retry logic, which includes checking if the device was added to the
bridge in the meantime to deal with this issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
system-linux.c