mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-03 07:31:54 +00:00
Merge commit 'e550a37206528be39e4751865b46720885fd64ed' into integrated
This commit is contained in:
commit
8f4159a911
@ -133,16 +133,31 @@ ospf_hello_receive(struct ospf_packet *pkt, struct ospf_iface *ifa,
|
||||
return;
|
||||
}
|
||||
|
||||
/* XXXX */
|
||||
#ifdef OSPFv2
|
||||
if (n && (n->rid != ntohl(pkt->routerid)))
|
||||
/* Check consistency of existing neighbor entry */
|
||||
if (n)
|
||||
{
|
||||
OSPF_TRACE(D_EVENTS, "Neighbor %I has changed router id from %R to %R",
|
||||
unsigned t = ifa->type;
|
||||
if (ospf_is_v2(po) && ((t == OSPF_IT_BCAST) || (t == OSPF_IT_NBMA) || (t == OSPF_IT_PTMP)))
|
||||
{
|
||||
/* Neighbor identified by IP address; Router ID may change */
|
||||
if (n->rid != ntohl(pkt->routerid))
|
||||
{
|
||||
OSPF_TRACE(D_EVENTS, "Neighbor %I has changed Router ID from %R to %R",
|
||||
n->ip, n->rid, ntohl(pkt->routerid));
|
||||
ospf_neigh_remove(n);
|
||||
n = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else /* OSPFv3 or OSPFv2/PtP */
|
||||
{
|
||||
/* Neighbor identified by Router ID; IP address may change */
|
||||
if (!ipa_equal(faddr, n->ip))
|
||||
{
|
||||
OSPF_TRACE(D_EVENTS, "Neighbor address changed from %I to %I", n->ip, faddr);
|
||||
n->ip = faddr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!n)
|
||||
{
|
||||
@ -183,15 +198,6 @@ ospf_hello_receive(struct ospf_packet *pkt, struct ospf_iface *ifa,
|
||||
ospf_neigh_update_bfd(n, n->ifa->bfd);
|
||||
}
|
||||
|
||||
/* XXXX */
|
||||
#ifdef OSPFv3 /* NOTE: this could also be relevant for OSPFv2 on PtP ifaces */
|
||||
else if (!ipa_equal(faddr, n->ip))
|
||||
{
|
||||
OSPF_TRACE(D_EVENTS, "Neighbor address changed from %I to %I", n->ip, faddr);
|
||||
n->ip = faddr;
|
||||
}
|
||||
#endif
|
||||
|
||||
ospf_neigh_sm(n, INM_HELLOREC);
|
||||
|
||||
two_way = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user