summaryrefslogtreecommitdiff
path: root/lib/table.c
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-01-06 18:31:15 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-09-18 14:42:26 +0200
commitc8172af6825ad4b10e68b33b8edc22e6e2dc1524 (patch)
tree525bd54d0c497f46f95777c2afbc70c682037c81 /lib/table.c
parent67fe40676eb4e2ca78a41ddd70887af09b29fd9d (diff)
lib: add link-state prefixes
Add to the library the link-state type of prefixes. Link-state prefixes contain much more data than the current prefixes and they only make sense for BGP Link-State. Storing all the data in "struct prefix" is not relevant because it would increase the memory usage of all daemons. Instead a pointer to a structure that contains all the information is used. Printing link-state prefixes can be delegated to a hook function. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'lib/table.c')
-rw-r--r--lib/table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/table.c b/lib/table.c
index 3bf93894ec..1910bd0427 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -142,7 +142,7 @@ static void route_common(const struct prefix *n, const struct prefix *p,
const uint8_t *pp;
uint8_t *newp;
- if (n->family == AF_FLOWSPEC)
+ if (n->family == AF_FLOWSPEC || n->family == AF_LINKSTATE)
return prefix_copy(new, p);
np = (const uint8_t *)&n->u.prefix;
pp = (const uint8_t *)&p->u.prefix;