summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsupd.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/lsupd.c
parentd5d9693ce90c190ca7358b4ac71b9d034603a3ae (diff)
downloadbird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.tar
bird-5e3436d20ffdd95a164ffcb82f584fad76fb94e7.zip
Cleanup in packet.c. Deleted unused parameters.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 52531bf..2211891 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -283,24 +283,15 @@ ospf_lsupd_send_list(struct ospf_neighbor *n, list * l)
void
ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
- struct ospf_iface *ifa, u16 size)
+ struct ospf_iface *ifa, struct ospf_neighbor *n)
{
- u32 area, nrid;
- struct ospf_neighbor *n, *ntmp;
+ u32 area;
+ struct ospf_neighbor *ntmp;
struct ospf_lsa_header *lsa;
struct ospf_area *oa;
struct proto_ospf *po = ifa->proto;
struct proto *p = (struct proto *) po;
- u8 i;
- int sendreq = 1;
-
- nrid = ntohl(ps->ospf_packet.routerid);
-
- if ((n = find_neigh(ifa, nrid)) == NULL)
- {
- OSPF_TRACE(D_PACKETS, "Received lsupd from unknown neighbor! (%I)", nrid);
- return;
- }
+ unsigned int i, sendreq = 1, size = ntohs(ps->ospf_packet.length);
if (n->state < NEIGHBOR_EXCHANGE)
{
@@ -329,8 +320,8 @@ ospf_lsupd_receive(struct ospf_lsupd_packet *ps,
{
struct ospf_lsa_header lsatmp;
struct top_hash_entry *lsadb;
- int diff = ((u8 *) lsa) - ((u8 *) ps);
- u16 chsum, lenn = ntohs(lsa->length);
+ unsigned diff = ((u8 *) lsa) - ((u8 *) ps), lenn = ntohs(lsa->length);
+ u16 chsum;
if (((diff + sizeof(struct ospf_lsa_header)) >= size)
|| ((lenn + diff) > size))