diff options
author | hasso <hasso> | 2005-06-24 10:17:51 +0200 |
---|---|---|
committer | hasso <hasso> | 2005-06-24 10:17:51 +0200 |
commit | 7b6ae028f96b8a894d56b46dd9e2206bf996c781 (patch) | |
tree | 7a00dd9710b71b9a037415c9bbac5975ad1e8d56 /ospf6d/ospf6_message.c | |
parent | * ospf6_interface.c: fix the way inactivity_timer is called. Because (diff) | |
download | frr-7b6ae028f96b8a894d56b46dd9e2206bf996c781.tar.xz frr-7b6ae028f96b8a894d56b46dd9e2206bf996c781.zip |
* 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]
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r-- | ospf6d/ospf6_message.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index a4e5d6740..017da52f0 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) |