diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-05-09 14:51:39 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-05-09 14:51:39 +0200 |
commit | 1647923bd8d2f8e53337365abc5be7e343aa570c (patch) | |
tree | 72f34e15257ca9a9fbe2d4041bf2bb210076e32c /proto/ospf/lsack.c | |
parent | 255722e0fcf251c101ff5bec92f1867edf841daa (diff) |
OSPF: Minor refactoring of packet sending code
Common behavior for LSupd and delayed LSack moved to ospf_send_to_iface()
and other minor changes.
Diffstat (limited to 'proto/ospf/lsack.c')
-rw-r--r-- | proto/ospf/lsack.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c index 5318e50c..1654953f 100644 --- a/proto/ospf/lsack.c +++ b/proto/ospf/lsack.c @@ -111,20 +111,12 @@ ospf_send_lsack_(struct ospf_proto *p, struct ospf_neighbor *n, int queue) { OSPF_PACKET(ospf_dump_lsack, pkt, "LSACK packet sent to nbr %R on %s", n->rid, ifa->ifname); ospf_send_to(ifa, n->ip); - return; } - - OSPF_PACKET(ospf_dump_lsack, pkt, "LSACK packet sent via %s", ifa->ifname); - - if (ifa->type == OSPF_IT_BCAST) + else { - if ((ifa->state == OSPF_IS_DR) || (ifa->state == OSPF_IS_BACKUP)) - ospf_send_to_all(ifa); - else - ospf_send_to_des(ifa); + OSPF_PACKET(ospf_dump_lsack, pkt, "LSACK packet sent via %s", ifa->ifname); + ospf_send_to_iface(ifa); } - else - ospf_send_to_agt(ifa, NEIGHBOR_EXCHANGE); } void |