Commit Graph

5255 Commits

Author SHA1 Message Date
Don Slice
1dac3a9619 zebra: stop deregistering static nexthops unless removing the static
Problem reported was that with some overlapping static route configurations,
when the link went down the less specific static was not re-installed after
the link came back up.  Determined that with the overlapping statics, we
would recursively resolve the next-hop temporarily thru the more specific
static route, but since the next-hop wasn't actually reachable, we would go
through the code that clears the nht information for the static completely.
This caused the nht code to no longer process the static route.

After reviewing the process, there doesn't seem to be any reason that the
static should be deregistered in that section of code.  Removed the
deregister and the problem is resolved and not addional failures seen in
manual testing.  zebra_test.py completed successfully and ospf and bgp smokes
completed with no new failures.

Ticket: CM-14873
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-5696
2017-05-17 08:19:51 -04:00
Don Slice
63d825b0db zebrad: Correct problem removing dead routes from rib due to NHT issue
Fix for another issue with next-hop tracking for overlapping static routes
created a problem removing the dead routes.  This fix corrects that error.

Ticket: CM-13710
Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: ospf-smoke, bgp-smoke
2017-05-17 08:19:07 -04:00
Don Slice
9c5cd62f08 zebra: Move interfaces to default before deleting
Encountered a crash in zebra due to getting a delete on an SVI with
VRR configured.  Since we don't actually do a delete but flag the interface
as inactive, slag VRR interfaces would remain on the vrf_iflist with a lock
count of zero, causing the crash.  Since all other interface types are moved
to the default table before deleting, doing the same thing for any interfaces
that were left in the vrf.

Testing includes manual testing, bgp-min, ospf-min, vrf-min, bgp-smoke, and ospf-smoke.
All passed (first time or on rerun) or match known failures.

Ticket: CM-13288
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
2017-05-17 08:18:14 -04:00
David Lamparter
56b6674bc0 Merge pull request #553 from donaldsharp/missed_2.0
Missed 2.0
2017-05-17 11:14:48 +02:00
Donald Sharp
c2f6134436 bgpd: Fix vrf crash
Ensure that we have a valid vrf before we log
information about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
2017-05-16 15:25:53 -04:00
Donald Sharp
5b0747d71d ospf6d: Allow unconfig of unknown lsa's
When we are receiving the 'no debug ospf6 lsa unknown ...'
Allow the removal of the originate examine and flooding
keywords.

Ticket: CM-12805
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:24:30 -04:00
Donald Sharp
2dbfa8a020 ospf6d: Fix debug line always showing up in ospf6d
The command 'debug ospf6 lsa unknown' was
always showing up, upon starting of the ospf6 daemon.

Remove this from happening.  Also fix some help strings
while we are in there.

Ticket: CM-7913
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:22:21 -04:00
Donald Sharp
71ffee748f bgpd: More Extended nexthop fixing
Basically if we are reading in a cli with a extended-nexthop
and we have not received from zebra the interface we are working
on I believe we have a race condition where we are not
propagating the PEER_FLAG_CAPABILITY_ENHE in this case.

Modify the code to propagate even if we haven't found the
interface yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:21:25 -04:00
Donald Sharp
70a4754dd0 ospfd: Fix possible crash and wrong data being shown
When you have more than one ospf interface configured
to be used, we were attempting to reuse the
json_interface_sub pointer after we added it
to the json data structure.

Ticket: CM-13597
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:11:33 -04:00
Donald Sharp
c22767d89e bgpd: Fix ADJCHANGE message to include more info
When bgp logs ADJCHANGE messages include the
hostname and vrf that this change is being made
in.

Ticket: CM-10922
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:10:33 -04:00
Donald Sharp
c358f112a6 bgpd: Fix occassional turn off of extended-nexthop for an if
Sometimes, like once every 400 iterations, when you restart
Quagga, extended-nexthop has been turned off for interface
based config( for 5549 ).

Examining the code, there is only 1 real path to setting
the PEER_FLAG_CAPABILITITY_ENHE and that is through
peer_conf_interface_get.  Modify this code path
to always set the PEER_FLAG_CAPABILITY_ENHE if it is
not already set.

In addition, fix a possible pointer dereference.

Ticket: CM-12929
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 15:06:35 -04:00
David Lamparter
9b938b384c Merge pull request #492 from dwalton76/stable/2.0
Change Frr.conf to frr.conf
2017-05-16 17:55:58 +02:00
Donald Sharp
291012893e Merge pull request #505 from adamfitz/stable/2.0
added troubleshooting section to debian 8 build doc
2017-05-11 08:20:08 -04:00
Adam Fitzgerald
818c4f214a added troubleshooting section to debian 8 build doc 2017-05-11 21:03:23 +10:00
Daniel Walton
9bcb88c7bf Change Frr.conf to frr.conf
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-05-10 00:55:10 +00:00
Russ White
95d69c3420 Merge pull request #487 from LabNConsulting/working/2.0/patch/issue459
bgpd: add back unicast option to 'address-family vpnv(4&6)' Issue #459
2017-05-09 20:01:11 -04:00
Russ White
35f8fe3b32 Merge pull request #489 from donaldsharp/sudoers
*: Remove ability to install frr_sudoers for 2.0
2017-05-09 19:48:33 -04:00
Donald Sharp
5490641755 *: Remove ability to install frr_sudoers
If the user were to uncomment last line
and allow VTYSH_SHOW to be used as a non-root
account, this would allow arbitrary command completion
inside of vtysh via multiple -c ... -c .... lines

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-09 16:18:04 -04:00
Lou Berger
399598bf6b bgpd: add back unicast option to 'address-family vpnv(4&6)' Issue #459 2017-05-09 14:52:54 -04:00
Jafar Al-Gharaibeh
fba10244ef Merge pull request #461 from donaldsharp/poll_2.0
Poll 2.0
2017-05-04 13:09:25 -05:00
David Lamparter
ff871f86e1 pimd: fix clang warning
pimd/pim_sock.c:178:13: error: implicit conversion from
	'int' to 'char' changes value from 148 to -108
	[-Werror,-Wconstant-conversion]
    ra[0] = 148;

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-04 10:26:12 -04:00
Donald Sharp
a03d3c8040 lib: Rename HAVE_POLL to prevent conflicting #defines
Rename HAVE_POLL to HAVE_POLL_CALL, when compiling with
snmp and poll enabled this was causing issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-04 10:24:25 -04:00
Sam Tannous
7e5e32b62f Remove uncalled function causing compiler error
Ticket: CM-16086
Reviewed By: sharpd
Testing Done: Built debs and tested on hardnode

With snmp enabled, this function was causing compiler
errors since it was not being called.  Removed it.

Signed-off-by: Sam Tannous <stannous@cumulusnetworks.com>
2017-05-04 10:19:57 -04:00
Donald Sharp
c0fee6efb6 Merge pull request #429 from hwchiu/fix_clang_sa
Fix some warnings by clang static analyzer
2017-05-02 11:45:42 -04:00
Hung-Weic Chiu
4da93320c7 Revert "Fix the "Use-after-free" of clang SA."
- This's the wrong way to fix this problem.
- Since the "TAILQ_FIRST()" always return diferent pointer as we call "TAILQ_REMOVE()", the clang static analyzer can't detect this behavior.
- Ignore this warning and keep files identical to its original one.

This reverts commit 5d6cc38ca3.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
2017-05-02 00:33:15 +00:00
Hung-Weic Chiu
c604467a08 Fix the "Uninitialized argument value" of clang SA.
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
2017-04-29 15:35:32 +00:00
Hung-Weic Chiu
3a6570a1f1 Fix the "Dead assignment" of clang SA.
- Remove duplicated assignemt.
- Remove unused initialized.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
2017-04-29 15:25:32 +00:00
Hung-Weic Chiu
5d6cc38ca3 Fix the "Use-after-free" of clang SA.
- Set the pointer to NULL after free it, otherwise the pointer will be accessed again. (since not null)

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
2017-04-29 15:02:31 +00:00
Hung-Weic Chiu
d8d58e9839 Fix the memory leak
- free the memory for all cases.

Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
2017-04-29 14:20:15 +00:00
Donald Sharp
650532d3d5 Merge pull request #419 from hwchiu/update-the-docs-of-ubuntu
Update the docs of ubuntu 12.04/14.04
2017-04-28 11:10:47 -04:00
Hung-Wei Chiu
362de4a621 update doc of ubuntu 12.04
1. modify the prefix to /usr (which is hard-code in /etc/init.d/frr)
2. install init.d related files.
2017-04-27 23:30:56 +08:00
Hung-Wei Chiu
500e13fea3 Update 14.04 docs to support init.d service
1. Configure the prefix to /usr  (frr script hard-code those path in /etc/init.d/frr)
2. Install the service file to /etc/init.d
2017-04-27 23:14:23 +08:00
Donald Sharp
e12ff52ab3 Merge pull request #415 from hwchiu/fix_ubuntu16.04
Update Building_FRR_on_Ubuntu1604 to make it support systemd
2017-04-27 08:31:16 -04:00
Hung-Wei Chiu
8a77d75b8a Update Building_FRR_on_Ubuntu1604.md
Fix typo
2017-04-27 11:22:15 +08:00
Hung-Wei Chiu
8399fd9d36 Update Building_FRR_on_Ubuntu1604.md
1.  Modify the configure prefix (since there some hard coded path in **/usr/lib/frr/fr**
2.  Install the systemd service config
2017-04-27 11:10:36 +08:00
Martin Winter
6491e6303e Merge pull request #370 from donaldsharp/as_path_fix
bgpd: Fix 'set as-path prepend last-as 10'
2017-04-17 14:46:28 -07:00
Donald Sharp
5cf5f2033b bgpd: Fix 'set as-path prepend last-as 10'
The route-map compilation function was comparing < 10
instead of <= 10.  While the cli was accepting 1-10.

Fix:
!
route-map FOO permit 44
 set as-path prepend last-as 10
!

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-14 20:05:48 -04:00
Martin Winter
6e38a83973 Merge pull request #366 from pichuang/fixed_add_group
Fixed some document typo
2017-04-13 14:52:16 -07:00
Phil Huang
be9665641d Clean installation guide with Debian/Ubuntu
Signed-off-by: Phil Huang <phil_huang@edge-core.com>
2017-04-13 21:20:53 +08:00
Phil Huang
7caef08c84 Add user frr into group frrvty
Signed-off-by: Phil Huang <phil_huang@edge-core.com>
2017-04-13 19:16:11 +08:00
Donald Sharp
81a37d8911 Merge pull request #365 from opensourcerouting/snap-doc-fixes
snapcraft: Improve README.usage.md based on feedback received
2017-04-12 21:12:26 -04:00
Martin Winter
2a3a819a9c snapcraft: Improve README.usage.md based on feedback received
- Fix snap connect (it's now called core, not ubuntu-core)
- Add section on MPLS configuration
- Add FAQ topic on ospfd/ospf6d crashing before privs are assigned to snap
- Add pointer to official webpage

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-04-12 16:00:43 -07:00
Donald Sharp
902726b81f doc: Cleanup 'Build the Software'
The frrouting.org web page:
https://frrouting.org/manual/Build-the-Software.html#Build-the-Software
is built from doc/install.texi.  The output on this page is a bit
missleading, let's clean it up some.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-07 17:20:32 -04:00
Martin Winter
3e71b5d907 Release: FRR-2.0
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-04-01 22:22:47 -07:00
Mike Tancsa
7e5b539722 lib: fix usage of getgrouplist() in *BSD
On BSD systems, the getgrouplist() function returns 0 if successful and
-1 on error.

Linux in the other hand returns *ngroups (the number of groups of which
user is a member) on success and -1 on error.

Given this difference, the most portable way to use getgrouplist()
is use its return value only for checking if it succeeded or not.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-04-01 00:50:40 -04:00
Donald Sharp
98b506c210 Merge pull request #307 from LabNConsulting/working/2.0/patch/rename2
Rename: FreeRangeRouting --> FRRouting
2017-03-30 14:23:55 -05:00
Lou Berger
d6180888fc Rename: freerangerouting --> frrouting
Signed-off-by: Lou Berger <lberger@labn.net>
2017-03-30 14:24:05 -04:00
Lou Berger
447a8fe92e Rename: FreeRangeRouting FRRouting
Signed-off-by: Lou Berger <lberger@labn.net>
2017-03-30 14:22:35 -04:00
Donald Sharp
fdbfd655c1 Merge pull request #299 from opensourcerouting/test-ref-out
tests: format TestRefMismatch more readable
2017-03-30 06:14:21 -05:00
Donald Sharp
aba41ec40c Merge pull request #298 from opensourcerouting/defaults
track version & "defaults" in configs
2017-03-30 06:13:19 -05:00