diff options
author | Christian Franke <chris@opensourcerouting.org> | 2018-07-22 21:49:02 +0200 |
---|---|---|
committer | Christian Franke <chris@opensourcerouting.org> | 2018-08-03 13:25:39 +0200 |
commit | d43d2df5f3b63a4d364bd1136a246dd74647913c (patch) | |
tree | 99a128870f0ccd0e65d6981430fc061a2da1fa57 /isisd/isis_tlvs.c | |
parent | isisd: add debug message if adjacency is ignored because IP is unusable (diff) | |
download | frr-d43d2df5f3b63a4d364bd1136a246dd74647913c.tar.xz frr-d43d2df5f3b63a4d364bd1136a246dd74647913c.zip |
isisd: learn and advertise IPv6 dst-src routes
Receive IPv6 dst-src routes from zebra and advertise them in our LSPs
if so configured.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_tlvs.c')
-rw-r--r-- | isisd/isis_tlvs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index 9b2aa7470..a433fcdb4 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -1912,6 +1912,11 @@ static void append_item(struct isis_item_list *dest, struct isis_item *item) dest->count++; } +static struct isis_item *last_item(struct isis_item_list *list) +{ + return container_of(list->tail, struct isis_item, next); +} + static int unpack_item(uint16_t mtid, enum isis_tlv_context context, uint8_t tlv_type, uint8_t len, struct stream *s, struct sbuf *log, void *dest, int indent) @@ -3168,6 +3173,21 @@ void isis_tlvs_add_ipv6_reach(struct isis_tlvs *tlvs, uint16_t mtid, append_item(l, (struct isis_item *)r); } +void isis_tlvs_add_ipv6_dstsrc_reach(struct isis_tlvs *tlvs, uint16_t mtid, + struct prefix_ipv6 *dest, + struct prefix_ipv6 *src, + uint32_t metric) +{ + isis_tlvs_add_ipv6_reach(tlvs, mtid, dest, metric); + struct isis_item_list *l = isis_get_mt_items(&tlvs->mt_ipv6_reach, + mtid); + + struct isis_ipv6_reach *r = (struct isis_ipv6_reach*)last_item(l); + r->subtlvs = isis_alloc_subtlvs(); + r->subtlvs->source_prefix = XCALLOC(MTYPE_ISIS_SUBTLV, sizeof(*src)); + memcpy(r->subtlvs->source_prefix, src, sizeof(*src)); +} + void isis_tlvs_add_oldstyle_reach(struct isis_tlvs *tlvs, uint8_t *id, uint8_t metric) { |