mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
networkd: Don't try to close fd in sd_radv_stop if fd is closed.
sd_radv_stop is called from two places. if sd_radv_stop is alrady success then just don't try to close it . ``` systemd-networkd[604]: RADV: Stopping IPv6 Router Advertisement daemon systemd-networkd[604]: RADV: Unable to send last Router Advertisement with router lifetime set to zero: Bad file descriptor <==================HERE systemd-networkd[604]: RADV: Updated prefix 2a0a:*:*:fc::/64 preferred 1h valid 2h systemd-networkd[604]: RADV: Started IPv6 Router Advertisement daemon ``` Closes one of the issue #8960
This commit is contained in:
parent
cb8770ed21
commit
6f8a8b84f2
@ -352,6 +352,9 @@ _public_ int sd_radv_stop(sd_radv *ra) {
|
||||
|
||||
assert_return(ra, -EINVAL);
|
||||
|
||||
if (ra->state == SD_RADV_STATE_IDLE)
|
||||
return 0;
|
||||
|
||||
log_radv("Stopping IPv6 Router Advertisement daemon");
|
||||
|
||||
/* RFC 4861, Section 6.2.5, send at least one Router Advertisement
|
||||
|
Loading…
Reference in New Issue
Block a user