diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-02-14 13:30:37 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 17:35:18 +0200 |
| commit | ee47a75047be152d64e37eef00864ecbcd32426f (patch) | |
| tree | 0c1254002cd4b526ba2fde0083dcf2fb1f01ba98 | |
| parent | 989138b99e4c5a0977bb53e3311e43b9765d0504 (diff) | |
isisd: Add copy function for SRv6 End SID Sub-TLV
Add a function to copy an SRv6 End SID Sub-TLV (RFC 9352 section #7.2).
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
| -rw-r--r-- | isisd/isis_tlvs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index e0671312b4..cd20c97623 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -2056,6 +2056,20 @@ static int unpack_tlvs(enum isis_tlv_context context, size_t avail_len, struct stream *stream, struct sbuf *log, void *dest, int indent, bool *unpacked_known_tlvs); +/* Functions for Sub-TLV 5 SRv6 End SID as per RFC 9352 section #7.2 */ +static struct isis_item *copy_item_srv6_end_sid(struct isis_item *i) +{ + struct isis_srv6_end_sid_subtlv *sid = + (struct isis_srv6_end_sid_subtlv *)i; + struct isis_srv6_end_sid_subtlv *rv = + XCALLOC(MTYPE_ISIS_SUBTLV, sizeof(*rv)); + + rv->behavior = sid->behavior; + rv->sid = sid->sid; + + return (struct isis_item *)rv; +} + /* Functions related to TLVs 1 Area Addresses */ static struct isis_item *copy_item_area_address(struct isis_item *i) |
