sd-radv: send RA on update in caller side

As the caller may want to update multiple prefixes and friends.
Let's not automatically announce on update in library side.

Currently, only prefix is updated during running. Hence, this does not
change any effective behavior.
This commit is contained in:
Yu Watanabe
2024-04-24 12:22:05 +09:00
parent 956709a28f
commit 96dd66eddf
2 changed files with 10 additions and 42 deletions
+10 -1
View File
@@ -761,9 +761,18 @@ int radv_add_prefix(
return r;
r = sd_radv_add_prefix(link->radv, p);
if (r < 0 && r != -EEXIST)
if (r == -EEXIST)
return 0;
if (r < 0)
return r;
if (sd_radv_is_running(link->radv)) {
/* Announce updated prefixe now. */
r = sd_radv_send(link->radv);
if (r < 0)
return r;
}
return 0;
}