summaryrefslogtreecommitdiffstats
path: root/isisd/isis_tlvs.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-05-31 15:14:26 +0200
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:13 +0200
commit2c92bee49943b5703e183387ac0dd636a9c0e4c4 (patch)
treea6bb53b7ab93caae0b7713f1cdae0ed7681860da /isisd/isis_tlvs.c
parentisisd: add TLV 13 Purge Originator Identification (diff)
downloadfrr-2c92bee49943b5703e183387ac0dd636a9c0e4c4.tar.xz
frr-2c92bee49943b5703e183387ac0dd636a9c0e4c4.zip
isisd: add purge originator identification support
Implement RFC 6232, optionally allowing to flood isisd's NET and hostname in purges it originates. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_tlvs.c')
-rw-r--r--isisd/isis_tlvs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c
index 0efe52d0c..b22460a0b 100644
--- a/isisd/isis_tlvs.c
+++ b/isisd/isis_tlvs.c
@@ -3697,3 +3697,20 @@ isis_tlvs_lookup_mt_router_info(struct isis_tlvs *tlvs, uint16_t mtid)
return NULL;
}
+
+void isis_tlvs_set_purge_originator(struct isis_tlvs *tlvs,
+ const uint8_t *generator,
+ const uint8_t *sender)
+{
+ assert(!tlvs->purge_originator);
+
+ tlvs->purge_originator = XCALLOC(MTYPE_ISIS_TLV,
+ sizeof(*tlvs->purge_originator));
+ memcpy(tlvs->purge_originator->generator, generator,
+ sizeof(tlvs->purge_originator->generator));
+ if (sender) {
+ tlvs->purge_originator->sender_set = true;
+ memcpy(tlvs->purge_originator->sender, sender,
+ sizeof(tlvs->purge_originator->sender));
+ }
+}