* 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.

	[port from GNU Zebra]
This commit is contained in:
hasso 2005-06-24 08:17:51 +00:00
parent 3e834b122b
commit 7b6ae028f9
2 changed files with 14 additions and 30 deletions

View 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> 2005-06-24 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospf6_interface.c: fix the way inactivity_timer is called. Because * ospf6_interface.c: fix the way inactivity_timer is called. Because

View 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_drouter = on->drouter = hello->drouter;
on->prev_bdrouter = on->bdrouter = hello->bdrouter; on->prev_bdrouter = on->bdrouter = hello->bdrouter;
on->priority = hello->priority; 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 */ /* TwoWay check */
for (p = (char *) ((caddr_t) hello + sizeof (struct ospf6_hello)); for (p = (char *) ((caddr_t) hello + sizeof (struct ospf6_hello));
p + sizeof (u_int32_t) <= OSPF6_MESSAGE_END (oh); 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; 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 *) dbdesc = (struct ospf6_dbdesc *)
((caddr_t) oh + sizeof (struct ospf6_header)); ((caddr_t) oh + sizeof (struct ospf6_header));
@ -885,13 +880,6 @@ ospf6_lsreq_recv (struct in6_addr *src, struct in6_addr *dst,
return; 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 && if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
on->state != OSPF6_NEIGHBOR_LOADING && on->state != OSPF6_NEIGHBOR_LOADING &&
on->state != OSPF6_NEIGHBOR_FULL) on->state != OSPF6_NEIGHBOR_FULL)
@ -978,13 +966,6 @@ ospf6_lsupdate_recv (struct in6_addr *src, struct in6_addr *dst,
return; 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 && if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
on->state != OSPF6_NEIGHBOR_LOADING && on->state != OSPF6_NEIGHBOR_LOADING &&
on->state != OSPF6_NEIGHBOR_FULL) on->state != OSPF6_NEIGHBOR_FULL)
@ -1065,13 +1046,6 @@ ospf6_lsack_recv (struct in6_addr *src, struct in6_addr *dst,
return; 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 && if (on->state != OSPF6_NEIGHBOR_EXCHANGE &&
on->state != OSPF6_NEIGHBOR_LOADING && on->state != OSPF6_NEIGHBOR_LOADING &&
on->state != OSPF6_NEIGHBOR_FULL) on->state != OSPF6_NEIGHBOR_FULL)