summaryrefslogtreecommitdiffstats
path: root/zebra (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'dev/osr/vty_index'David Lamparter2016-12-151-2/+1
|\ | | | | Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * lib: remove vty->indexDavid Lamparter2016-12-091-2/+1
| | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | zebra_mpls. Set best lsp nhlfe to null on deletionFredi Raspall2016-12-141-0/+3
| | | | | | | | | | | | | | When a nhlfe was deleted and it happened to be the best, lsp->best_nhlfe was not updated causing lsp_process() to see an inexistent nhlfe. Fix: set lsp->best_nhlfe to null on deletion.
* | zebra/ldpd: allow MPLS ECMP on unnumbered interfacesRenato Westphal2016-12-143-30/+73
| | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org> (cherry picked from commit 7144dc12b55e05c9ae3d784dfb75817c9f881eb6)
* | zebra-mpls: fix regression caused by wrong conflict resolutionRenato Westphal2016-12-141-0/+17
| | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | zebra: fix segfault on exit when RIB debugging is enabledRenato Westphal2016-12-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following crash on exit: (gdb) bt 0 _rnode_zlog (...) at zebra_rib.c:104 1 0x0000000000417726 in rib_unlink (...) at zebra_rib.c:2370 2 0x000000000042db80 in zebra_rtable_node_destroy (...) at zebra_vrf.c:336 3 0x00007ffff7b6ce2e in route_node_free (...) at table.c:81 4 0x00007ffff7b6ced7 in route_table_free (...) at table.c:118 5 0x00007ffff7b6cd88 in route_table_finish (...) at table.c:53 6 0x000000000042defa in zebra_vrf_delete (...) at zebra_vrf.c:278 7 0x00007ffff7b9e044 in vrf_delete (...) at vrf.c:162 8 0x00007ffff7b9e89f in vrf_terminate () at vrf.c:458 9 0x000000000041027c in sigint () at main.c:205 10 0x00007ffff7b953f2 in quagga_sigevent_process () at sigevent.c:111 11 0x00007ffff7b681dd in thread_fetch (...) at thread.c:1297 12 0x000000000040c7ed in main (...) at main.c:471 To fix the problem, free the table->info pointer only after route_table_finish() is called for the table. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* | zebra: Remove weird blackhole/reject static routesQuentin Young2016-12-141-151/+4
|/ | | | | | | | Doesn't make sense to fully configure a static route and then specify that it should be rejected. Remove & rename relevant commands. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Merge branch 'fixes/command'David Lamparter2016-12-081-1/+1
|\ | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * zebra: use correct cmd index for 'no ipv6 route' commandChristian Franke2016-12-051-1/+1
| | | | | | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* | zebra: fix segfault on "show mpls table"Renato Westphal2016-12-081-4/+4
| | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | Merge remote-tracking branch 'osr/master' into vtysh-grammarQuentin Young2016-12-0628-529/+609
|\ \ | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: lib/command_match.c
| * | *: fix up DEFUNs without install_element callsDavid Lamparter2016-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | These now generate warnings which will break the build with -Werror. Note this may have enabled commands that should be disabled, or the other way around... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | Merge branch 'queue/osr/vtysh-generic'David Lamparter2016-12-052-63/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: Merge contains nontrivial fixups in vrf_cmd handling. Conflicts: lib/if.c zebra/interface.c
| * \ \ Merge branch 'stable/2.0'David Lamparter2016-12-0528-529/+639
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bgpd/bgp_route.c lib/if.c ripd/rip_interface.c zebra/interface.c zebra/zebra_vty.c
| | * | Merge branch '-rip' into stable/2.0David Lamparter2016-12-051-7/+3
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes up a lot of RIP/RIPng compliance tests that were still flagged up. Tested-by: Martin Winter <mwinter@opensourcerouting.org>
| | | * | *: create a helper function to set the IP_MULTICAST_LOOP sockoptionRenato Westphal2016-11-251-6/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | pimd/zebra: fix setting of IP_MULTICAST_LOOP on OpenBSDRenato Westphal2016-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux, FreeBSD and NetBSD (and possibly others too) accept both uint8_t and int for the IP_MULTICAST_LOOP sockoption. OpenBSD, in the other hand, accepts only uint8_t. To make setting IP_MULTICAST_LOOP work on every supported platform, always pass a uint8_t variable as a parameter. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | * | | Merge branch '-renato' into stable/2.0David Lamparter2016-12-0527-515/+631
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains bgp memory leak fixes as well as cleanups to VRF/namespace handling and has been run through extended testing in Cumulus' testbed: Tested-by: Donald Sharp <sharpd@cumulusnetworks.com>
| | | * | | zebra: plug more memory leaksRenato Westphal2016-11-288-69/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try to free all memory explicitly on exit. This should help to detect new memory leaks in the future with tools like valgrind. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra: loop through all static routes on vrf enable/disableRenato Westphal2016-11-281-42/+36
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra/lib: remove redundant fields from zebra_vrfRenato Westphal2016-11-2814-157/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to duplicate the 'vrf_id' and 'name' fields from the 'vrf' structure into the 'zebra_vrf' structure. Instead of that, add a back pointer in 'zebra_vrf' that should point to the associated 'vrf' structure. Additionally, modify the vrf callbacks to pass the whole vrf structure as a parameter. This allow us to make further simplifications in the code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | lib/zebra: put vrf_get() on a dietRenato Westphal2016-11-284-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, for some reason we had two functions to search a VRF by its name: zebra_vrf_lookup_by_name() and zebra_vrf_list_lookup_by_name(). The first one would loop through vrf_table and the other one through vrf_list. This is not necessary anymore, so remove zebra_vrf_lookup_by_name() and rename zebra_vrf_list_lookup_by_name() to zebra_vrf_lookup_by_name(). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra: order VRFs by name on user outputRenato Westphal2016-11-284-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | lib/zebra: convert vrf_list to a red-black treeRenato Westphal2016-11-282-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we're already using a red-black tree to store VRFs sorted by their vrf_id's, create a new tree to store VRFs sorted by their names. The biggest advantage of doing this is that we reduce the time complexity of vrf_list_lookup_by_name() from O(n) to O(log n). Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | *: rename two vrf functionsRenato Westphal2016-11-288-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since VRFs can be searched by vrf_id or name, make this explicit in the helper functions. s/vrf_lookup/vrf_lookup_by_id/ s/zebra_vrf_lookup/zebra_vrf_lookup_by_id/ Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | lib: convert vrf code to use red-black trees as wellRenato Westphal2016-11-2811-143/+137
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra: nuke zvrf_list and always use vrf_list insteadRenato Westphal2016-11-283-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zvrf_list doesn't need to exist, it's basically a duplicate version of vrf_list. Also, zebra_vrf_delete() wasn't removing zvrf from zvrf_list, which was a bug. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra/lib: move some code aroundRenato Westphal2016-11-284-63/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move netlink code from zebra_nc.c to kernel_netlink.c; * move vrf CLI commands from if.c/interface.c to vrf.c/zebra_vrf.c; * move declaration of the 'ns' structure to a header file. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | | * | | zebra/lib: plug several memleaksRenato Westphal2016-11-287-15/+41
| | | |/ / | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| | * | | lib, zebra: Minimize display of link-params sub dataDonald Sharp2016-12-051-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When link-params is configured it auto starts displaying 6000-02# conf t dell-s6000-02(config)# int swp1 dell-s6000-02(config-if)# link-params dell-s6000-02(config-link-params)# admin-grp 0x12345678 dell-s6000-02(config-link-params)# end dell-s6000-02# show run interface swp1 link-params enable metric 0 <----Remove the bw lines max-bw 1.25e+06 max-rsv-bw 1.25e+06 unrsv-bw 0 1.25e+06 unrsv-bw 1 1.25e+06 unrsv-bw 2 1.25e+06 unrsv-bw 3 1.25e+06 unrsv-bw 4 1.25e+06 unrsv-bw 5 1.25e+06 unrsv-bw 6 1.25e+06 unrsv-bw 7 1.25e+06 admin-grp 305419896 exit-link-params ! I'd like to reduce this to: interface enp0s3 ip igmp ip pim sm link-params enable admin-grp 0x12345678 <----- Fix this to be what we entered exit-link-params ! Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | | | Merge remote-tracking branch 'osr_private_quagga/queue/osr/vtysh-generic' ↵Quentin Young2016-12-0211-175/+74
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | into vtysh-grammar
| * | | | *: make DEFUN installations file-localDavid Lamparter2016-12-011-34/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves all install_element calls into the file where the DEFUNs are located. This fixes several small related bugs: - ospf6d wasn't installing a "no interface FOO" command - zebra had a useless copy of "interface FOO" - pimd's copy of "interface FOO" was not setting qobj_index, which means "description LINE" commands would fail with an error The next commit will do the actual act of making "foo_cmd" static. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | Merge branch 'stable/2.0'David Lamparter2016-12-011-2/+3
| |\| |
| | * | zebra: check ZEBRA_IFC_REAL on if_upChristian Franke2016-12-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only connected routes which have ZEBRA_IFC_REAL set should be redistributed. Signed-off-by: Christian Franke <nobody@nowhere.ws> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | Merge branch 'vtysh-grammar'David Lamparter2016-11-2824-4451/+1386
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: isisd/isisd.c lib/Makefile.am lib/thread.c Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | Merge remote-tracking branch 'cmaster-next' into cmaster-next-relengDavid Lamparter2016-11-282-35/+53
| |\ \ \ | | | |/ | | |/|
| * | | zebra: add missing license headers to two filesRenato Westphal2016-11-282-0/+42
| | | | | | | | | | | | | | | | Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| * | | Merge remote-tracking branch 'cmaster-next' into cmaster-next-relengDavid Lamparter2016-11-191-0/+20
| |\ \ \
| * | | | lib: replace strlcpy & strlcat with glibc versionsDavid Lamparter2016-11-155-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems these two were at some point copied in from rsync; replace with more recent versions that will hopefully become available in glibc as well. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | | build: massively remove needless checksDavid Lamparter2016-11-151-132/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we have autoconf results from a wide swath of target platforms, we can go remove checks that have the same result on all systems. This also removes several "fallback" implementations of functions that, at some point in the history, weren't available on all target platforms. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | | zebra: fix sign warning in SNMP codeDavid Lamparter2016-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| * | | | *: fix some licensing SNAFUsDavid Lamparter2016-11-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bgpd/bgpd.c had a typo zebra/zebra_mpls_netlink.c was derived from rt_netlink.c isisd/include-netbsd/* are not needed (2 constants moved over) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | | | | all: Replace "JavaScript Object Notation\n" with JSON_STRQuentin Young2016-11-302-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | | all: Fix all underfull doc stringsQuentin Young2016-11-304-17/+38
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally: * Add [ip] to a couple bgp show commands * Quick refactor of a couple ISIS commands * Quick refactor of a couple OSPF6 commands Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* | | | Merge branch 'cmaster-next' into vtysh-grammarQuentin Young2016-11-223-35/+73
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: zebra/interface.c
| * | | Merge remote-tracking branch 'origin/cmaster' into cmaster-nextDonald Sharp2016-11-191-35/+34
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: debian/changelog zebra/zebra_rnh.c
| | * | | zebra: remove recursively derived static routes correctlyDon Slice2016-11-141-35/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported that in certain configs, when a router is initially booted and the link is bounced, we can end up with a bogus static route in the table. This was due to the assumption in zebra_rnh that a static route would not be recursively resolved through another static route with a different next-hop. This fix changes this assumption. Tested manually and bgp-min, ospf-min, and vrf-min run with no new failures. Ticket: CM-13328 Signed-off-by: Don Slice Reviewed-by: CCR-5338
| * | | | vtysh, zebra: Fix link-params to use exit-link-paramsDonald Sharp2016-11-181-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the link-params submode to use the 'exit-link-params' to indicate we are exiting a submode. Fixup all the relevant bits. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| * | | | Merge remote-tracking branch 'opensourcerouting/cmaster-next-linkpar' into ↵Donald Sharp2016-11-181-0/+8
| |\ \ \ \ | | |_|_|/ | |/| | | | | | | | cmaster-next
| | * | | zebra: fix link-params CLI handlingDavid Lamparter2016-11-121-0/+8
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | vtysh was breaking in a rather ugly way, and some "no" forms were missing too. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>