summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-09-11 10:11:42 -0400
committerPaul Jakma <paul@quagga.net>2015-09-24 15:26:43 +0100
commit58a83f2f5dc24da3194bfa8255499029315e8649 (patch)
tree7dc5143fac70d71814a448ed3116e389d17fe8fa /bgpd
parent79969960aae4adbae1eac6caebc289fe09ddc1d6 (diff)
downloadquagga-58a83f2f5dc24da3194bfa8255499029315e8649.tar.bz2
quagga-58a83f2f5dc24da3194bfa8255499029315e8649.tar.xz
bgpd: Warn user that bgp is setting maximum-paths larger than MULTIPATH_NUM
In cases where a distribution has compiled zebra with a MULTIPATH_NUM that is less than what the user is setting the maximum-paths in bgp, warn them that some of the nexthops will not make it into zebra and by extension the kernel for routing. The command is still accepted. dell-s6000-02(config)# router bgp 100 dell-s6000-02(config-router)# maximum-paths 3 % Warning: maximum-paths set to 3 is greater than 2 that zebra is compiled to support dell-s6000-02(config-router)# maximum-paths ibgp 44 % Warning: maximum-paths set to 44 is greater than 2 that zebra is compiled to support dell-s6000-02(config-router)# Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/Makefile.am2
-rw-r--r--bgpd/bgp_vty.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am
index 4659ac68..b2614f46 100644
--- a/bgpd/Makefile.am
+++ b/bgpd/Makefile.am
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in.
AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
-DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
+DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@
INSTALL_SDATA=@INSTALL@ -m 600
AM_CFLAGS = $(WERROR)
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 62331635..4fd255fc 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -676,6 +676,11 @@ DEFUN (bgp_maxpaths,
return CMD_WARNING;
}
+ if ((MULTIPATH_NUM != 0) && (maxpaths > MULTIPATH_NUM))
+ vty_out (vty,
+ "%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s",
+ maxpaths, MULTIPATH_NUM, VTY_NEWLINE);
+
return CMD_SUCCESS;
}
@@ -704,6 +709,11 @@ DEFUN (bgp_maxpaths_ibgp,
return CMD_WARNING;
}
+ if ((MULTIPATH_NUM != 0) && (maxpaths > MULTIPATH_NUM))
+ vty_out (vty,
+ "%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s",
+ maxpaths, MULTIPATH_NUM, VTY_NEWLINE);
+
return CMD_SUCCESS;
}