summaryrefslogtreecommitdiff
path: root/lib/srcdest_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/srcdest_table.c')
-rw-r--r--lib/srcdest_table.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/srcdest_table.c b/lib/srcdest_table.c
index ee87d73077..8ffa0e9709 100644
--- a/lib/srcdest_table.c
+++ b/lib/srcdest_table.c
@@ -4,7 +4,7 @@
* Copyright (C) 2017 by David Lamparter & Christian Franke,
* Open Source Routing / NetDEF Inc.
*
- * This file is part of FreeRangeRouting (FRR)
+ * This file is part of FRRouting (FRR)
*
* FRR is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -317,3 +317,13 @@ static ssize_t printfrr_rn(char *buf, size_t bsz, const char *fmt,
srcdest2str(dst_p, (const struct prefix_ipv6 *)src_p, buf, bsz);
return 2;
}
+
+struct route_table *srcdest_srcnode_table(struct route_node *rn)
+{
+ if (rnode_is_dstnode(rn)) {
+ struct srcdest_rnode *srn = srcdest_rnode_from_rnode(rn);
+
+ return srn->src_table;
+ }
+ return NULL;
+}