summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2015-11-06 17:34:41 +0100
committerDaniel Walton <dwalton@cumulusnetworks.com>2015-11-06 17:34:41 +0100
commit06370dacc02b238a0ca5205f59b366807449bb84 (patch)
treee37875cbd972a43988ddb7b273b96c806754cb41 /bgpd/bgp_aspath.c
parentBGP: Correctly display local-as for peer-group member (diff)
downloadfrr-06370dacc02b238a0ca5205f59b366807449bb84.tar.xz
frr-06370dacc02b238a0ca5205f59b366807449bb84.zip
BGP: Implement "neighbor x.x.x.x addpath-tx-bestpath-per-AS"
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-8114
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index c9a6f3fd9..f4d7c4aad 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -1147,6 +1147,15 @@ aspath_firstas_check (struct aspath *aspath, as_t asno)
return 0;
}
+int
+aspath_get_firstas (struct aspath *aspath)
+{
+ if (aspath == NULL || aspath->segments == NULL)
+ return 0;
+
+ return aspath->segments->as[0];
+}
+
/* AS path loop check. If aspath contains asno then return >= 1. */
int
aspath_loop_check (struct aspath *aspath, as_t asno)