]> git.proxmox.com Git - mirror_frr.git/commitdiff
* ospf6_message.c: Changed to be insensitive to changes of neighbors'
authorhasso <hasso>
Fri, 24 Jun 2005 08:17:51 +0000 (08:17 +0000)
committerhasso <hasso>
Fri, 24 Jun 2005 08:17:51 +0000 (08:17 +0000)
  IP source address in the OSPF packets. It was sometimes problematic
  in actual operation (needed some operational cost: restarting
  all-neighbor routers when I/F NIC was changed). Due to this change,
  a previously safe case, attaching multiple interface to the same
  link will now be dengerous and will not work. Remedy to that should
  be applied later.

[port from GNU Zebra]

ospf6d/ChangeLog
ospf6d/ospf6_message.c

index 87b4fac7766543bd441d6de1bfafe2ca1ca0c391..711e1a89f3bd5a59627184c7227dc755a9b72fbe 100644 (file)
@@ -1,3 +1,13 @@
+2005-06-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
+
+       * ospf6_message.c: Changed to be insensitive to changes of neighbors'
+         IP source address in the OSPF packets. It was sometimes problematic
+         in actual operation (needed some operational cost: restarting
+         all-neighbor routers when I/F NIC was changed). Due to this change,
+         a previously safe case, attaching multiple interface to the same
+         link will now be dengerous and will not work. Remedy to that should
+         be applied later.
+
 2005-06-24 Yasuhiro Ohara  <yasu@sfc.wide.ad.jp>
 
        * ospf6_interface.c: fix the way inactivity_timer is called. Because
index a4e5d67409895b1b2d0723017ce0bf986ceeaa6a..017da52f0d03fce0e60e4cf3252263cdb2cddafa 100644 (file)
@@ -322,10 +322,12 @@ ospf6_hello_recv (struct in6_addr *src, struct in6_addr *dst,
       on->prev_drouter = on->drouter = hello->drouter;
       on->prev_bdrouter = on->bdrouter = hello->bdrouter;
       on->priority = hello->priority;
-      on->ifindex = ntohl (hello->interface_id);
-      memcpy (&on->linklocal_addr, src, sizeof (struct in6_addr));
     }
 
+  /* always override neighbor's source address and ifindex */
+  on->ifindex = ntohl (hello->interface_id);
+  memcpy (&on->linklocal_addr, src, sizeof (struct in6_addr));
+
   /* TwoWay check */
   for (p = (char *) ((caddr_t) hello + sizeof (struct ospf6_hello));
        p + sizeof (u_int32_t) <= OSPF6_MESSAGE_END (oh);
@@ -826,13 +828,6 @@ ospf6_dbdesc_recv (struct in6_addr *src, struct in6_addr *dst,
       return;
     }
 
-  if (memcmp (src, &on->linklocal_addr, sizeof (struct in6_addr)))
-    {
-      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
-        zlog_debug ("Seems to be from Secondary I/F of the neighbor, ignore");
-      return;
-    }
-
   dbdesc = (struct ospf6_dbdesc *)
     ((caddr_t) oh + sizeof (struct ospf6_header));
 
@@ -885,13 +880,6 @@ ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst,
       return;
     }
 
-  if (memcmp (src, &on->linklocal_addr, sizeof (struct in6_addr)))
-    {
-      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
-        zlog_debug ("Seems to be from Secondary I/F of the neighbor, ignore");
-      return;
-    }
-
   if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
       on->state != OSPF6_NEIGHBOR_LOADING &&
       on->state != OSPF6_NEIGHBOR_FULL)
@@ -978,13 +966,6 @@ ospf6_lsupdate_recv (struct in6_addr *src, struct in6_addr *dst,
       return;
     }
 
-  if (memcmp (src, &on->linklocal_addr, sizeof (struct in6_addr)))
-    {
-      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
-        zlog_debug ("Seems to be from Secondary I/F of the neighbor, ignore");
-      return;
-    }
-
   if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
       on->state != OSPF6_NEIGHBOR_LOADING &&
       on->state != OSPF6_NEIGHBOR_FULL)
@@ -1065,13 +1046,6 @@ ospf6_lsack_recv (struct in6_addr *src, struct in6_addr *dst,
       return;
     }
 
-  if (memcmp (src, &on->linklocal_addr, sizeof (struct in6_addr)))
-    {
-      if (IS_OSPF6_DEBUG_MESSAGE (oh->type, RECV))
-        zlog_debug ("Seems to be from Secondary I/F of the neighbor, ignore");
-      return;
-    }
-
   if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
       on->state != OSPF6_NEIGHBOR_LOADING &&
       on->state != OSPF6_NEIGHBOR_FULL)