When a prefix is deprecated (valid_lifetime == 0), it should be
announced with the same flags as before. The old code announced it
without any flags, which leads to being ignored by recipients.
Note that a prefix could be depreacted for two reason - it is removed
from the interface, or it is deconfigured in BIRD configuration.
Thanks to Michael Saxl for the bugreport.
op->type = OPT_PREFIX;
op->length = 4;
op->pxlen = px->prefix.pxlen;
- op->flags = (pc->onlink ? OPT_PX_ONLINK : 0) |
- (pc->autonomous ? OPT_PX_AUTONOMOUS : 0) |
- (pc->pd_preferred ? OPT_PX_PD_PREFERRED : 0);
+ op->flags = (px->onlink ? OPT_PX_ONLINK : 0) |
+ (px->autonomous ? OPT_PX_AUTONOMOUS : 0) |
+ (px->pd_preferred ? OPT_PX_PD_PREFERRED : 0);
op->valid_lifetime = (ifa->ra->active || !pc->valid_lifetime_sensitive) ?
htonl(pc->valid_lifetime) : 0;
op->preferred_lifetime = (ifa->ra->active || !pc->preferred_lifetime_sensitive) ?
existing->valid = 1;
existing->changed = now;
existing->mark = 1;
+
+ existing->onlink = pc->onlink;
+ existing->autonomous = pc->autonomous;
+ existing->pd_preferred = pc->pd_preferred;
+
existing->cf = pc;
}
u8 valid; /* Is the prefix valid? If not, we advertise it
with 0 lifetime, so clients stop using it */
u8 mark; /* A temporary mark for processing */
+ u8 onlink; /* Flags copied from prefix config */
+ u8 autonomous;
+ u8 pd_preferred;
+
btime changed; /* Last time when the prefix changed */
struct radv_prefix_config *cf; /* The config tied to this prefix */
};