summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsreq.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-06-06 21:53:52 +0200
committerOndrej Filip <feela@network.cz>2004-06-06 21:53:52 +0200
commit5e3436d20ffdd95a164ffcb82f584fad76fb94e7 (patch)
treea9531cf1fe9bea7c8dacf41277b8793f76a62506 /proto/ospf/lsreq.c
parentd5d9693ce90c190ca7358b4ac71b9d034603a3ae (diff)
downloadbird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.tar
bird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.zip
Cleanup in packet.c. Deleted unused parameters.
Diffstat (limited to 'proto/ospf/lsreq.c')
-rw-r--r--proto/ospf/lsreq.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/proto/ospf/lsreq.c b/proto/ospf/lsreq.c
index 046e149..98d2d06 100644
--- a/proto/ospf/lsreq.c
+++ b/proto/ospf/lsreq.c
@@ -66,36 +66,27 @@ ospf_lsreq_send(struct ospf_neighbor *n)
void
ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
- struct ospf_iface *ifa, u16 size)
+ struct ospf_iface *ifa, struct ospf_neighbor *n)
{
- u32 nrid;
- struct ospf_neighbor *n;
struct ospf_lsreq_header *lsh;
struct l_lsr_head *llsh;
list uplist;
slab *upslab;
- int length, i, lsano;
+ unsigned int size = ntohs(ps->ospf_packet.length);
+ int i, lsano;
struct proto *p = (struct proto *) ifa->proto;
- nrid = ntohl(ps->ospf_packet.routerid);
-
- if ((n = find_neigh(ifa, nrid)) == NULL)
- {
- OSPF_TRACE(D_PACKETS, "Received lsreq from unknown neighbor! (%I)", nrid);
- return;
- }
if (n->state < NEIGHBOR_EXCHANGE)
return;
OSPF_TRACE(D_EVENTS, "Received LS req from neighbor: %I", n->ip);
ospf_neigh_sm(n, INM_HELLOREC);
- length = ntohs(ps->ospf_packet.length);
lsh = (void *) (ps + 1);
init_list(&uplist);
upslab = sl_new(n->pool, sizeof(struct l_lsr_head));
- lsano = (length - sizeof(struct ospf_lsreq_packet)) /
+ lsano = (size - sizeof(struct ospf_lsreq_packet)) /
sizeof(struct ospf_lsreq_header);
for (i = 0; i < lsano; lsh++, i++)
{