1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

OSPF: Minor refactoring of packet sending code

Common behavior for LSupd and delayed LSack moved to ospf_send_to_iface()
and other minor changes.
This commit is contained in:
Ondrej Zajicek (work)
2021-05-09 14:51:39 +02:00
parent 255722e0fc
commit 1647923bd8
4 changed files with 39 additions and 41 deletions

View File

@@ -398,15 +398,7 @@ ospf_flood_lsupd(struct ospf_proto *p, struct top_hash_entry **lsa_list, uint ls
OSPF_PACKET(ospf_dump_lsupd, ospf_tx_buffer(ifa),
"LSUPD packet flooded via %s", ifa->ifname);
if (ifa->type == OSPF_IT_BCAST)
{
if ((ifa->state == OSPF_IS_DR) || (ifa->state == OSPF_IS_BACKUP))
ospf_send_to_all(ifa);
else
ospf_send_to_des(ifa);
}
else
ospf_send_to_agt(ifa, NEIGHBOR_EXCHANGE);
ospf_send_to_iface(ifa);
}
return i;