struct ospf_lsa *new;
new = XCALLOC (MTYPE_OSPF_LSA, sizeof (struct ospf_lsa));
- memset (new, 0, sizeof (struct ospf_lsa));
new->flags = 0;
new->lock = 1;
}
new->area = area;
- SET_FLAG (new->flags, OSPF_LSA_SELF);
+ SET_FLAG (new->flags, OSPF_LSA_SELF | OSPF_LSA_SELF_CHECKED);
/* Copy LSA data to store, discard stream. */
new->data = ospf_lsa_data_new (length);
}
new->area = oi->area;
- SET_FLAG (new->flags, OSPF_LSA_SELF);
+ SET_FLAG (new->flags, OSPF_LSA_SELF | OSPF_LSA_SELF_CHECKED);
/* Copy LSA to store. */
new->data = ospf_lsa_data_new (length);
/* Create OSPF LSA instance. */
new = ospf_lsa_new ();
new->area = area;
- SET_FLAG (new->flags, OSPF_LSA_SELF);
+ SET_FLAG (new->flags, OSPF_LSA_SELF | OSPF_LSA_SELF_CHECKED);
/* Copy LSA to store. */
new->data = ospf_lsa_data_new (length);
return NULL;
new->data->ls_seqnum = lsa_seqnum_increment (lsa);
-
- /* Re-calculate checksum. */
- ospf_lsa_checksum (new->data);
ospf_lsa_install (ospf, NULL, new);
/* Create OSPF LSA instance. */
new = ospf_lsa_new ();
new->area = area;
- SET_FLAG (new->flags, OSPF_LSA_SELF);
+ SET_FLAG (new->flags, OSPF_LSA_SELF | OSPF_LSA_SELF_CHECKED);
/* Copy LSA to store. */
new->data = ospf_lsa_data_new (length);
return NULL;
new->data->ls_seqnum = lsa_seqnum_increment (lsa);
-
- /* Re-calculate checksum. */
- ospf_lsa_checksum (new->data);
ospf_lsa_install (ospf, NULL, new);
/* Now, create OSPF LSA instance. */
new = ospf_lsa_new ();
new->area = NULL;
- SET_FLAG (new->flags, OSPF_LSA_SELF|OSPF_LSA_APPROVED);
+ SET_FLAG (new->flags, OSPF_LSA_SELF | OSPF_LSA_APPROVED | OSPF_LSA_SELF_CHECKED);
/* Copy LSA data to store, discard stream. */
new->data = ospf_lsa_data_new (length);
return;
}
}
- /* Re-calculate checksum. */
- ospf_lsa_checksum (new->data);
/* install also as Type-7 */
ospf_lsa_install (ospf, NULL, new); /* Remove Old, Lock New = 2 */
/* add translated flag, checksum and lock new lsa */
SET_FLAG (new->flags, OSPF_LSA_LOCAL_XLT); /* Translated from 7 */
- ospf_lsa_checksum (new->data);
new = ospf_lsa_lock (new);
return new;
new->data->ls_seqnum = lsa_seqnum_increment (lsa);
- /* Re-calculate checksum. */
- ospf_lsa_checksum (new->data);
-
ospf_lsa_install (ospf, NULL, new); /* As type-5. */
/* Flood LSA through AS. */