Revision 061ab802 proto/ospf/topology.c

View differences:

proto/ospf/topology.c
22 22

  
23 23
void originate_prefix_rt_lsa(struct ospf_area *oa);
24 24
void originate_prefix_net_lsa(struct ospf_iface *ifa);
25
void flush_prefix_net_lsa(struct ospf_iface *ifa);
25 26

  
26 27
#ifdef OSPFv2
27 28
#define ipa_to_rid(x) _I(x)
......
557 558
  ifa->net_lsa->lsa.age = LSA_MAXAGE;
558 559
  lsasum_calculate(&ifa->net_lsa->lsa, ifa->net_lsa->lsa_body);
559 560
  ospf_lsupd_flood(po, NULL, NULL, &ifa->net_lsa->lsa, dom, 0);
560

  
561

  
562 561
  flush_lsa(ifa->net_lsa, po);
563 562
  ifa->net_lsa = NULL;
564 563
}
......
1215 1214
  ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
1216 1215
}
1217 1216

  
1217
void
1218
flush_prefix_net_lsa(struct ospf_iface *ifa)
1219
{
1220
  struct proto_ospf *po = ifa->oa->po;
1221
  struct proto *p = &po->proto;
1222
  struct top_hash_entry *en = ifa->pxn_lsa;
1223
  u32 dom = ifa->oa->areaid;
1224

  
1225
  if (en == NULL)
1226
    return;
1227

  
1228
  OSPF_TRACE(D_EVENTS, "Flushing Net Prefix lsa for iface \"%s\".",
1229
	     ifa->iface->name);
1230
  en->lsa.sn += 1;
1231
  en->lsa.age = LSA_MAXAGE;
1232
  lsasum_calculate(&en->lsa, en->lsa_body);
1233
  ospf_lsupd_flood(po, NULL, NULL, &en->lsa, dom, 0);
1234
  flush_lsa(en, po);
1235
  ifa->pxn_lsa = NULL;
1236
}
1237

  
1238

  
1218 1239
#endif
1219 1240

  
1220 1241

  

Also available in: Unified diff