]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
rip_reconfigure done right
authorPavel Machek <pavel@ucw.cz>
Wed, 10 May 2000 13:05:39 +0000 (13:05 +0000)
committerPavel Machek <pavel@ucw.cz>
Wed, 10 May 2000 13:05:39 +0000 (13:05 +0000)
proto/rip/rip.c
proto/rip/rip.h

index 17d0d5a918d209d7ff804966ddfe0c1c472b8127..f69127dbf62fe6095ef04586da7f2b59222d1024 100644 (file)
@@ -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 = {
index 7c7b000f29a8d6dad5c36fbd154c5139c81a14dc..cbddeaf6d7b309a507f73ece28771b532af7fb8b 100644 (file)
@@ -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;