summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ChangeLog10
-rw-r--r--ospf6d/ospf6_message.c34
2 files changed, 14 insertions, 30 deletions
diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog
index 87b4fac7..711e1a89 100644
--- a/ospf6d/ChangeLog
+++ b/ospf6d/ChangeLog
@@ -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
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index a4e5d674..017da52f 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -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)