Revision 9669362f proto/ospf/lsupd.c

View differences:

proto/ospf/lsupd.c
69 69
	}
70 70
      }
71 71
      if(nn==n) continue;
72
      en=ospf_hash_get_header(nn->lsrth, hh);
72
      if((en=ospf_hash_find_header(nn->lsrth, hh))==NULL)
73
      {
74
        en=ospf_hash_get_header(nn->lsrth, hh);
75
      }
76
      else
77
      {
78
        s_rem_node(SNODE en);
79
      }
73 80
      s_add_tail(&nn->lsrtl, SNODE en);
74 81
      ret=1;
82
      DBG("Adding LSA lsrt RT: %I, Id: %I, Type: %u for n: %I\n",
83
        en->lsa.rt,en->lsa.id, en->lsa.type, nn->ip);
75 84
    }
76 85
    if(ret==0) continue;
77 86
    if(ifa==iff)
......
147 156
  struct top_hash_entry *en;
148 157
  struct ospf_lsupd_packet *pk;
149 158
  struct ospf_packet *op;
159
  struct proto *p=&n->ifa->oa->po->proto;
150 160
  void *pktpos;
151 161
  u8 ii;
152 162
  u8 *jj=n->ifa->ip_sk->tbuf;
......
174 184
      op->length=htons(len);
175 185
      ospf_pkt_finalize(n->ifa, op);
176 186
		       
177
      for(ii=0;ii<(len-SIPH);ii+=4)
178
        DBG("Out dump: %d,%d,%d,%d\n", *(jj+ii), *(jj+ii+1), *(jj+ii+2), *(jj+ii+3));
179

  
180 187
      sk_send_to(n->ifa->ip_sk,len, n->ip, OSPF_PROTO);
188
      debug("%s: LS upd sent to %I\n", p->name, n->ip);
181 189

  
182 190
      DBG("LSupd: next packet\n");
183 191
      fill_ospf_pkt_hdr(n->ifa, pk, LSUPD);
......
201 209
    DBG("Out dump: %d,%d,%d,%d\n", *(jj+ii), *(jj+ii+1), *(jj+ii+2), *(jj+ii+3));
202 210

  
203 211
  sk_send_to(n->ifa->ip_sk,len, n->ip, OSPF_PROTO);
204
  DBG("LSupd: sent\n");
212
  debug("%s: LS upd sent to %I\n", p->name, n->ip);
205 213
}
206 214

  
207 215
void
......
233 241
    return;
234 242
  }
235 243

  
244
  debug("%s: Received LS upd from (%I)\n", p->name, n->ip); 
245

  
236 246
  lsa=(struct ospf_lsa_header *)(ps+1);
237 247
  area=htonl(ps->ospf_packet.areaid);
238 248
  oa=ospf_find_area((struct proto_ospf *)p,area);

Also available in: Unified diff