Revision e81b440f proto/ospf/lsupd.c

View differences:

proto/ospf/lsupd.c
290 290
	htonlsah(hh, lh);
291 291
	help = (u8 *) (lh + 1);
292 292
	en = ospf_hash_find_header(po->gr, domain, hh);
293
	htonlsab(en->lsa_body, help, hh->type, hh->length
294
		 - sizeof(struct ospf_lsa_header));
293
	htonlsab(en->lsa_body, help, hh->length - sizeof(struct ospf_lsa_header));
295 294
      }
296 295

  
297 296
      len = sizeof(struct ospf_lsupd_packet) + ntohs(lh->length);
......
386 385
    }
387 386
    htonlsah(&(en->lsa), pktpos);
388 387
    pktpos = pktpos + sizeof(struct ospf_lsa_header);
389
    htonlsab(en->lsa_body, pktpos, en->lsa.type, en->lsa.length
390
	     - sizeof(struct ospf_lsa_header));
388
    htonlsab(en->lsa_body, pktpos, en->lsa.length - sizeof(struct ospf_lsa_header));
391 389
    pktpos = pktpos + en->lsa.length - sizeof(struct ospf_lsa_header);
392 390
    len += en->lsa.length;
393 391
    lsano++;
......
630 628

  
631 629
      /* pg 144 (5d) */
632 630
      void *body = mb_alloc(p->pool, lsatmp.length - sizeof(struct ospf_lsa_header));
633
      ntohlsab(lsa + 1, body, lsatmp.type,
634
	       lsatmp.length - sizeof(struct ospf_lsa_header));
631
      ntohlsab(lsa + 1, body, lsatmp.length - sizeof(struct ospf_lsa_header));
635 632

  
636 633
      /* We will do validation check after flooding and
637 634
	 acknowledging given LSA to minimize problems

Also available in: Unified diff