diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-04 11:06:51 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-04 11:06:51 +0200 |
commit | f9c799a00e705b1420b214628c2bb2a30bf491d9 (patch) | |
tree | 23386935f0128d31acab5f86da41774cac0a4de5 /proto/ospf/lsack.c | |
parent | d2ceaf4ec82837239a35ace00399ce3aa845849e (diff) |
Temporary OSPFv3 development commit (changing multicast support).
Diffstat (limited to 'proto/ospf/lsack.c')
-rw-r--r-- | proto/ospf/lsack.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c index dc942197..2aafd9d4 100644 --- a/proto/ospf/lsack.c +++ b/proto/ospf/lsack.c @@ -57,7 +57,6 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue) { struct ospf_packet *op; struct ospf_lsack_packet *pk; - sock *sk; u16 len, i = 0; struct ospf_lsa_header *h; struct lsah_n *no; @@ -67,13 +66,8 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue) if (EMPTY_LIST(n->ackl[queue])) return; - if (ifa->type == OSPF_IT_BCAST) - sk = ifa->hello_sk; - else - sk = ifa->ip_sk; - - pk = (struct ospf_lsack_packet *) sk->tbuf; - op = (struct ospf_packet *) sk->tbuf; + pk = (struct ospf_lsack_packet *) ifa->sk->tbuf; + op = (struct ospf_packet *) ifa->sk->tbuf; ospf_pkt_fill_hdr(n->ifa, pk, LSACK_P); h = pk->lsh; @@ -98,22 +92,22 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue) op->length = htons(len); DBG("Sending and continuing! Len=%u\n", len); - OSPF_PACKET(ospf_dump_lsack, (struct ospf_lsack_packet *) sk->tbuf, + OSPF_PACKET(ospf_dump_lsack, (struct ospf_lsack_packet *) ifa->sk->tbuf, "LSACK packet sent via %s", ifa->iface->name); if (ifa->type == OSPF_IT_BCAST) { if ((ifa->state == OSPF_IS_DR) || (ifa->state == OSPF_IS_BACKUP)) - ospf_send_to(sk, AllSPFRouters, ifa); + ospf_send_to(ifa, AllSPFRouters); else - ospf_send_to(sk, AllDRouters, ifa); + ospf_send_to(ifa, AllDRouters); } else { if ((ifa->state == OSPF_IS_DR) || (ifa->state == OSPF_IS_BACKUP)) - ospf_send_to_agt(sk, ifa, NEIGHBOR_EXCHANGE); + ospf_send_to_agt(ifa, NEIGHBOR_EXCHANGE); else - ospf_send_to_bdr(sk, ifa); + ospf_send_to_bdr(ifa); } ospf_pkt_fill_hdr(n->ifa, pk, LSACK_P); @@ -126,24 +120,18 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue) op->length = htons(len); DBG("Sending! Len=%u\n", len); - OSPF_PACKET(ospf_dump_lsack, (struct ospf_lsack_packet *) sk->tbuf, + OSPF_PACKET(ospf_dump_lsack, (struct ospf_lsack_packet *) ifa->sk->tbuf, "LSACK packet sent via %s", ifa->iface->name); if (ifa->type == OSPF_IT_BCAST) { if ((ifa->state == OSPF_IS_DR) || (ifa->state == OSPF_IS_BACKUP)) - { - ospf_send_to(sk, AllSPFRouters, ifa); - } + ospf_send_to(ifa, AllSPFRouters); else - { - ospf_send_to(sk, AllDRouters, ifa); - } + ospf_send_to(ifa, AllDRouters); } else - { - ospf_send_to_agt(sk, ifa, NEIGHBOR_EXCHANGE); - } + ospf_send_to_agt(ifa, NEIGHBOR_EXCHANGE); } void |