diff options
-rw-r--r-- | proto/rip/rip.c | 7 | ||||
-rw-r--r-- | proto/rip/rip.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 17d0d5a..f69127d 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -868,10 +868,11 @@ static int rip_reconfigure(struct proto *p, struct proto_config *c) { struct rip_config *new = (struct rip_config *) c; + int generic = sizeof(struct proto_config) + sizeof(list); - return !memcmp(((byte *) P_CF) + sizeof(struct proto_config), - ((byte *) new) + sizeof(struct proto_config), - sizeof(struct rip_proto_config) - sizeof(struct proto_config)); + return !memcmp(((byte *) P_CF) + generic, + ((byte *) new) + generic, + sizeof(struct rip_proto_config) - generic); } struct protocol proto_rip = { diff --git a/proto/rip/rip.h b/proto/rip/rip.h index 7c7b000..cbddeaf 100644 --- a/proto/rip/rip.h +++ b/proto/rip/rip.h @@ -120,7 +120,7 @@ struct rip_patt { struct rip_proto_config { struct proto_config c; - list iface_list; /* Patterns configured */ + list iface_list; /* Patterns configured -- keep it first; see rip_reconfigure why */ int infinity; /* User configurable data */ int port; |