From 394acced118df7360e480920c65ca260c5b8c44f Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Sun, 2 Apr 2000 20:41:33 +0000 Subject: Work on lsupdates continues. Some checksum cleanup. --- proto/ospf/lsupd.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'proto/ospf/lsupd.c') diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 8f9d6aa..2fa0137 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -83,10 +83,10 @@ void ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, struct ospf_iface *ifa, u16 size) { - u32 nrid, myrid; + u32 area,nrid,myrid; struct ospf_neighbor *n; - struct ospf_lsreq_header *lsh; - int length; + struct ospf_lsa_header *lsa; + u16 length; u8 i; nrid=ntohl(ps->ospf_packet.routerid); @@ -99,6 +99,24 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p, nrid); return ; } - /* FIXME Go on! */ + if(n->statename); + return; + } + + lsa=(struct ospf_lsa_header *)(ps+1); + area=htonl(ps->ospf_packet.areaid); + for(i=0;ilsano);i++) + { + if(lsa->checksum==lsasum_check(lsa,NULL,(struct proto_ospf *)p)) + { + DBG("Processing update Type: %u ID: %u RT: %u\n",lsa->type, + ntohl(lsa->id), ntohl(lsa->rt)); + /* FIXME Go on */ + } + lsa=(struct ospf_lsa_header *)(((u8 *)lsa)+ntohs(lsa->length)); + } } -- cgit v1.2.3