Revision 394acced proto/ospf/lsupd.c

View differences:

proto/ospf/lsupd.c
83 83
ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
84 84
  struct ospf_iface *ifa, u16 size)
85 85
{
86
  u32 nrid, myrid;
86
  u32 area,nrid,myrid;
87 87
  struct ospf_neighbor *n;
88
  struct ospf_lsreq_header *lsh;
89
  int length;
88
  struct ospf_lsa_header *lsa;
89
  u16 length;
90 90
  u8 i;
91 91

  
92 92
  nrid=ntohl(ps->ospf_packet.routerid);
......
99 99
      nrid);
100 100
    return ;
101 101
  }
102
  /* FIXME Go on! */
102
  if(n->state<NEIGHBOR_EXCHANGE)
103
  {
104
    debug("%s: Received lsupd in lesser state than EXCHANGE from (%u)\n",
105
      p->name);
106
    return;
107
  }
108

  
109
  lsa=(struct ospf_lsa_header *)(ps+1);
110
  area=htonl(ps->ospf_packet.areaid);
111
  for(i=0;i<ntohl(ps->lsano);i++)
112
  {
113
    if(lsa->checksum==lsasum_check(lsa,NULL,(struct proto_ospf *)p))
114
    {
115
      DBG("Processing update Type: %u ID: %u RT: %u\n",lsa->type,
116
        ntohl(lsa->id), ntohl(lsa->rt));
117
      /* FIXME Go on */
118
    }
119
    lsa=(struct ospf_lsa_header *)(((u8 *)lsa)+ntohs(lsa->length));
120
  }
103 121
}
104 122

  

Also available in: Unified diff