diff options
| author | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2018-02-21 00:36:58 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-21 00:36:58 -0800 |
| commit | f487dcaf74c9bd7a716a749d15281d5b92d363d4 (patch) | |
| tree | 5362b8a4081b3b8a13038fa520c8d66a95c0192e /ospf6d/ospf6_message.c | |
| parent | 7fdaec88941d66d831363d32084cc88c5b98ac6c (diff) | |
| parent | 4298f5e937a1fa689047697395f8b741fb9b3d15 (diff) | |
Merge branch 'master' into evpn-bug-fixes
Diffstat (limited to 'ospf6d/ospf6_message.c')
| -rw-r--r-- | ospf6d/ospf6_message.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index d76438ea50..fe74ddc982 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -2163,6 +2163,40 @@ int ospf6_lsupdate_send_neighbor(struct thread *thread) return 0; } +int ospf6_lsupdate_send_neighbor_now(struct ospf6_neighbor *on, + struct ospf6_lsa *lsa) +{ + struct ospf6_header *oh; + struct ospf6_lsupdate *lsupdate; + u_char *p; + int lsa_cnt = 0; + + memset(sendbuf, 0, iobuflen); + oh = (struct ospf6_header *)sendbuf; + lsupdate = (struct ospf6_lsupdate *)((caddr_t)oh + + sizeof(struct ospf6_header)); + + p = (u_char *)((caddr_t)lsupdate + sizeof(struct ospf6_lsupdate)); + ospf6_lsa_age_update_to_send(lsa, on->ospf6_if->transdelay); + memcpy(p, lsa->header, OSPF6_LSA_SIZE(lsa->header)); + p += OSPF6_LSA_SIZE(lsa->header); + lsa_cnt++; + + oh->type = OSPF6_MESSAGE_TYPE_LSUPDATE; + oh->length = htons(p - sendbuf); + lsupdate->lsa_number = htonl(lsa_cnt); + + if (IS_OSPF6_DEBUG_FLOODING || + IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_LSUPDATE, SEND)) + zlog_debug("%s: Send lsupdate with lsa %s (age %u)", + __PRETTY_FUNCTION__, lsa->name, + ntohs(lsa->header->age)); + + ospf6_send_lsupdate(on, NULL, oh); + + return 0; +} + int ospf6_lsupdate_send_interface(struct thread *thread) { struct ospf6_interface *oi; |
