diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-06 21:53:52 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-06 21:53:52 +0200 |
commit | 5e3436d20ffdd95a164ffcb82f584fad76fb94e7 (patch) | |
tree | a9531cf1fe9bea7c8dacf41277b8793f76a62506 /proto/ospf/lsack.c | |
parent | d5d9693ce90c190ca7358b4ac71b9d034603a3ae (diff) | |
download | bird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.tar bird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.zip |
Cleanup in packet.c. Deleted unused parameters.
Diffstat (limited to 'proto/ospf/lsack.c')
-rw-r--r-- | proto/ospf/lsack.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c index 3a4e965..7d7238c 100644 --- a/proto/ospf/lsack.c +++ b/proto/ospf/lsack.c @@ -119,25 +119,13 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue) void ospf_lsack_receive(struct ospf_lsack_packet *ps, - struct ospf_iface *ifa, u16 size) + struct ospf_iface *ifa, struct ospf_neighbor *n) { - u32 nrid, myrid; - struct ospf_neighbor *n; struct ospf_lsa_header lsa, *plsa; - u16 nolsa, i; + u16 nolsa; struct top_hash_entry *en; - u16 lenn = ntohs(ps->ospf_packet.length); struct proto *p = (struct proto *) ifa->proto; - - nrid = ntohl(ps->ospf_packet.routerid); - - myrid = p->cf->global->router_id; - - if ((n = find_neigh(ifa, nrid)) == NULL) - { - OSPF_TRACE(D_PACKETS, "Received LS ack from unknown neigbor! (%I)", nrid); - return; - } + unsigned int size = ntohs(ps->ospf_packet.length), i; OSPF_TRACE(D_PACKETS, "Received LS ack from %I", n->ip); ospf_neigh_sm(n, INM_HELLOREC); @@ -145,10 +133,10 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps, if (n->state < NEIGHBOR_EXCHANGE) return; - nolsa = (lenn - sizeof(struct ospf_lsack_packet)) / + nolsa = (size - sizeof(struct ospf_lsack_packet)) / sizeof(struct ospf_lsa_header); - if ((nolsa < 1) || ((lenn - sizeof(struct ospf_lsack_packet)) != + if ((nolsa < 1) || ((size - sizeof(struct ospf_lsack_packet)) != (nolsa * sizeof(struct ospf_lsa_header)))) { log(L_ERR "Received corrupted LS ack from %I", n->ip); |