diff options
Diffstat (limited to 'proto/radv/packets.c')
-rw-r--r-- | proto/radv/packets.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/proto/radv/packets.c b/proto/radv/packets.c index 088d177c..19d71f97 100644 --- a/proto/radv/packets.c +++ b/proto/radv/packets.c @@ -209,16 +209,16 @@ static int radv_prepare_prefix(struct radv_iface *ifa, struct radv_prefix *prefix, char **buf, char *bufend) { - struct radv_prefix_config *pc = prefix->config; - struct radv_opt_prefix *op = (void *) *buf; + struct radv_prefix_config *pc = prefix->cf; - if (*buf + sizeof(*op) > bufend) + if (*buf + sizeof(struct radv_opt_prefix) > bufend) { - log(L_WARN "%s: Too many prefixes on interface %s", ifa->ra->p.name, - ifa->iface->name); + log(L_WARN "%s: Too many prefixes on interface %s", + ifa->ra->p.name, ifa->iface->name); return -1; } + struct radv_opt_prefix *op = (void *) *buf; op->type = OPT_PREFIX; op->length = 4; op->pxlen = prefix->len; |