mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-24 16:42:04 +00:00

Add Maximum SRv6 SID Depths (MSDs) parameters as per RFC 9352 section #4 to the per-area IS-IS SRv6 Data Base. Currently the MSD values are hardcoded. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
67 lines
1.4 KiB
C
67 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* This is an implementation of Segment Routing over IPv6 (SRv6) for IS-IS
|
|
* as per RFC 9352
|
|
* https://datatracker.ietf.org/doc/html/rfc9352
|
|
*
|
|
* Copyright (C) 2023 Carmine Scarpitta - University of Rome Tor Vergata
|
|
*/
|
|
|
|
#include <zebra.h>
|
|
|
|
#include "isisd/isisd.h"
|
|
#include "isisd/isis_srv6.h"
|
|
|
|
/**
|
|
* IS-IS SRv6 initialization for given area.
|
|
*
|
|
* @param area IS-IS area
|
|
*/
|
|
void isis_srv6_area_init(struct isis_area *area)
|
|
{
|
|
struct isis_srv6_db *srv6db;
|
|
|
|
if (!area)
|
|
return;
|
|
|
|
srv6db = &area->srv6db;
|
|
|
|
sr_debug("ISIS-SRv6 (%s): Initialize Segment Routing SRv6 DB",
|
|
area->area_tag);
|
|
|
|
/* Initialize SRv6 Data Base */
|
|
memset(srv6db, 0, sizeof(*srv6db));
|
|
|
|
/* Pull defaults from the YANG module */
|
|
srv6db->config.enabled = yang_get_default_bool("%s/enabled", ISIS_SRV6);
|
|
|
|
srv6db->config.max_seg_left_msd = SRV6_MAX_SEG_LEFT;
|
|
srv6db->config.max_end_pop_msd = SRV6_MAX_END_POP;
|
|
srv6db->config.max_h_encaps_msd = SRV6_MAX_H_ENCAPS;
|
|
srv6db->config.max_end_d_msd = SRV6_MAX_END_D;
|
|
}
|
|
|
|
/**
|
|
* Terminate IS-IS SRv6 for the given area.
|
|
*
|
|
* @param area IS-IS area
|
|
*/
|
|
void isis_srv6_area_term(struct isis_area *area)
|
|
{
|
|
sr_debug("ISIS-SRv6 (%s): Terminate SRv6", area->area_tag);
|
|
}
|
|
|
|
/**
|
|
* IS-IS SRv6 global initialization.
|
|
*/
|
|
void isis_srv6_init(void)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* IS-IS SRv6 global terminate.
|
|
*/
|
|
void isis_srv6_term(void)
|
|
{
|
|
}
|