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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user