summaryrefslogtreecommitdiff
path: root/proto/radv/radv.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2015-02-21 21:08:23 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2015-02-21 21:08:23 +0100
commit2bbc308321894e0fd301766e8d7d78a4ec119053 (patch)
treecd3b8bab72022801655ad6b420ace93267b29f07 /proto/radv/radv.c
parent374917adccb955fbb2796955166fabe46a09e096 (diff)
Store protocol config size inside protocol structure
Make proto_config_new() use this info instead of supplied size. Thanks to Alexander V. Chernikov for the patch.
Diffstat (limited to 'proto/radv/radv.c')
-rw-r--r--proto/radv/radv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/radv/radv.c b/proto/radv/radv.c
index 6be7cd84..6370e006 100644
--- a/proto/radv/radv.c
+++ b/proto/radv/radv.c
@@ -207,7 +207,7 @@ radv_iface_remove(struct radv_iface *ifa)
static void
radv_if_notify(struct proto *p, unsigned flags, struct iface *iface)
-{
+{
struct proto_radv *ra = (struct proto_radv *) p;
struct radv_config *cf = (struct radv_config *) (p->cf);
@@ -361,7 +361,7 @@ radv_reconfigure(struct proto *p, struct proto_config *c)
// struct radv_config *old = (struct radv_config *) (p->cf);
struct radv_config *new = (struct radv_config *) c;
- /*
+ /*
* The question is why there is a reconfigure function for RAdv if
* it has almost none internal state so restarting the protocol
* would probably suffice. One small reason is that restarting the
@@ -426,6 +426,7 @@ radv_get_status(struct proto *p, byte *buf)
struct protocol proto_radv = {
.name = "RAdv",
.template = "radv%d",
+ .config_size = sizeof(struct radv_config),
.init = radv_init,
.start = radv_start,
.shutdown = radv_shutdown,