| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Description:
We use valgrind memcheck quite a bit to spot leaks in
our work with bgpd. In order to eliminate false positives,
we added code in the exit path to release the remaining
allocated memory.
Bgpd startup log message now includes pid.
Some little tweaks by Paul Jakma <paul.jakma@hpe.com>:
* bgp_mplsvpn.c: (str2prefix_rd) do the cleanup in common code at the end
and goto it.
|
| |
| |
| |
| |
| |
| |
| | |
According to RFC 2328, section 10.5 PointToPoint neighbors
should be identified by router ID instead of source IP address.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 4bab6806914dbb4b43f376ebf966a034a0ea72cd, as Joakim's
version of 'ip ospf area' and the 2 follow-up patches should avoid the issue
Vipin reported.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ospfd.c: (general) Clean up the whole running of OSPF on interfaces.
(add_ospf_interface) taking (struct interface *) arg is pointless here.
(ospf_is_ready) new helper.
(ospf_network_run_subnet) Put all the code for choosing whether to enable
OSPF on a subnet, and if so which area configuration to use, here. If a
subnet should not be enabled, ensure an existing oi is freed.
(ospf_network_run_interface) Just call run_subnet for all subnets on an
interface.
(ospf_network_run) Just call run_interface for all interfaces.
(ospf_if_update) Just call run_interface for the given interface.
(ospf_network_unset) Just call run_subnet for existing ois.
(ospf_update_interface_area) helper: update area on an oi, or create it.
(ospf_interface_set) renamed to ospf_interface_area_set for clarity.
Ensures OSPF is created, then into if_update.
(ospf_interface_unset) renamed to ospf_interface_area_unset and collapses
down to simple loop to call run_subnet for all ois.
* ospf_interface.h: add a more general OSPF_IF_PARAM_IS_SET, which does the
right thing and takes default config into account.
* ospf_vty.c: (OSPF_VTY_GET_IF_PARAMS) new macro with common code for handling
interface parameter commands - only used for 'ip ospf area' in this commit.
(OSPF_VTY_PARAM_UNSET) similar
({no,}ip_ospf_area) Use said macros.
* doc/ospfd.texi: add 'ip ospf area' command.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use with interface command:
interface ppp0
ip ospf area 0.0.0.0
This will enable OSPF on ppp0 with area 0.0.0.0
Remove with "no ip ospf area"
* ospf_vty.c: add "ip ospf area (A.B.C.D|<0-4294967295>)" interface command
* ospfd.c: (ospf_interface_{un,}set) new helper function to enable/disable
OSPF on a specific interface.
(ospf_if_update) 2 possible paths now to deal with interface updates.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ospfd.c: (ospf_network_run_interface) Move out core to ..
(add_ospf_interface) .. here
(ospf_network_{un,}set) move redistribute update out to..
(update_redistributed) .. here, so it can be re-used in upcoming commit.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
bgp is using both bm->master and master pointers interchangebly
for thread manipulation. Since they are the same thing consolidate
to one pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Both smux.c and vty.c have the same:
static struct thread_master *master;
as global variables for the file. This can and will lead to confusion
name the variables something appropriate for the file it is in.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
binding socket to an interface
Due to the time window between opening socket and binding it to an interface, the same hello
packet is delivered on multiple interfaces, unique socket per circuit is not yet established.
When such hellos get processed, they form incorrect adjacencies. So, drop the packet that is
received on multiple interfaces because the socket for the circuit is yet to bind to an interface.
V2: Fix warning on sign comparison
Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
|
| |
| |
| |
| |
| |
| |
| | |
This patch cleans up some interface startup, removes duplicate
debug messages and protects against some always being displayed.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| | |
There are PIM packet types that have not been implemented yet.
Notice when we get one of those and safely do nothing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| | |
There are several additional packet types that pimd is unaware of
Add code to allow pim to understand them in the future.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
pimd is very chatty without any pim debugs turned on.
This commit fixes a bunch of the debugs to be protected
by appropriate pim debug statement.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no need to display igmp default values for the query-interval
and the query-max-response-time-dsec
Before change:
!
interface swp4
description swp4 -> host-212's swp1
ip igmp
ip igmp query-interval 125
ip igmp query-max-response-time-dsec 100
ip pim ssm
link-detect
!
After change:
!
interface br1
ip igmp
ip pim ssm
link-detect
!
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| | |
test-stream is generating some compiler warnings
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit fixes these warnings:
1) bgpd/bgp_nexthop.c - dereferencing pointer 'X' does break strict-aliasing rules
2) pimd/pim_igmp_join.c - dereferencing pointer 'X' does break strict-aliasing rules
3) ripd/ripd.c - 'ifaddr.prefixlen' may be used uninitialized in this function
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There exists a sequence of cli commands that are successfully read in by bgpd.conf, but
not by a consolidated Quagga.conf.
This issue stems from the fact that the consolidated config file attempts to match the
current node + 1 node up the tree, while the individual config file searches for matches
all the way up the tree.
Quagga.conf read-in relies on vtysh_cmd.c command parsing which puts all nodes
at CONFIG_NODE and if a match is found CMD_SUCCESS_DAEMON is returned. This signals to
the parser to call the appropriate daemon with the comamnd.
bgp as an example has three levels of config node's. If you are reading in a config node
at the 3rd level(say address-family ipv6) then transition to another node under bgp it will
not work in Quagga.conf because the code only looked up one node and was at CONFIG_BGP when it failed
to find a match.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
zclient.c depended upon link time inclusion of a
extern struct thread_master *master. This is a violation of the
namespace of the calling daemon. If a library needs the pointer
pass it in and save it for future use.
This code change also makes the zclient code consistent with
the other lib functions that need to schedule work on your behalf
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When executing a 'show run' or 'write terminal' you see the
entire integrated config. You have no way of knowing what an
individual daemon is going to write until after you do a write
of config to disk if you are not using an integrated configuration.
This change allows the end-user to do such a thing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* HACKING: Converted initially from LaTeX to markdown with:
'pandoc -f latex -t markdown HACKING.tex'
Then tweaked by hand to add a header with some suitable variables for the
pandoc LaTeX template to make better use of the page space, and to add
newpages so the title page is standalone as in the previous version.
Also went through and reflowed paragraphs best as I could to make them
match the previous document, to make it a little easier to verify nothing
had been changed other than the markup, via diff.
PDF can be generated with: 'pandoc -o HACKING.pdf HACKING.md'
|
|/ |
|
|
|
|
|
| |
Fixed use of OSPF_MIN_LS_ARRIVAL, which changed its unit from
seconds to milliseconds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a deny
'set comm-list delete' stops as soon as it hits a community-list entry with
a deny
Reviewed By: sharpd@cumulusnetworks.com
Testing Done:
'set comm-list FOO delete' stops evaluating the community-list as soon as
we hit
the first "delete" statement. This makes it impossible to use
community-lists
where you deny some subset of communities to delete and then permit all of
the
others.
This patch changes the behavior so that we no longer exit the
community-list at
the first delete statement. Here is our baseline, we are receiving multiple
communities from 10.1.1.2 for the 10.1.3.0/24 prefix.
qct-ly6-04# show ip bgp 10.1.3.0/24
BGP routing table entry for 10.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
10.1.1.2 (metric 20) from 10.1.1.2 (10.1.1.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 1:1 1:2 1:3 20:1 20:2 20:3 99:1
Last update: Wed Mar 4 13:50:36 2015
qct-ly6-04#
We apply the following FOO route-map inbound to this peer and soft clear
the peer
!
ip community-list expanded BAD_COMMS permit 99:.*
ip community-list expanded BAD_COMMS deny 1:.*
ip community-list expanded BAD_COMMS permit 20.*
!
route-map FOO permit 10
set comm-list BAD_COMMS delete
!
router bgp 10
neighbor 10.1.1.2 route-map FOO in
!
qct-ly6-04# clear ip bgp * soft in
qct-ly6-04# show ip bgp 10.1.3.0/24
BGP routing table entry for 10.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
10.1.1.2 (metric 20) from 10.1.1.2 (10.1.1.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 1:1 1:2 1:3
Last update: Wed Mar 4 13:51:12 2015
qct-ly6-04#
qct-ly6-04#
We deleted all communities flagged as "permit" by the BAD_COMMS
community-list
while leaving the ones matched by "deny 1:.*" alone.
#endif /* _QUAGGA_BGP_COMMUNITY_H */
'set comm-list delete' stops as soon as it hits a community-list entry with a deny
Ticket: CM-3513
Reviewed By: sharpd@cumulusnetworks.com
Testing Done:
'set comm-list FOO delete' stops evaluating the community-list as soon as we hit
the first "delete" statement. This makes it impossible to use community-lists
where you deny some subset of communities to delete and then permit all of the
others.
This patch changes the behavior so that we no longer exit the community-list at
the first delete statement. Here is our baseline, we are receiving multiple
communities from 10.1.1.2 for the 10.1.3.0/24 prefix.
qct-ly6-04# show ip bgp 10.1.3.0/24
BGP routing table entry for 10.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
10.1.1.2 (metric 20) from 10.1.1.2 (10.1.1.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 1:1 1:2 1:3 20:1 20:2 20:3 99:1
Last update: Wed Mar 4 13:50:36 2015
qct-ly6-04#
We apply the following FOO route-map inbound to this peer and soft clear the peer
!
ip community-list expanded BAD_COMMS permit 99:.*
ip community-list expanded BAD_COMMS deny 1:.*
ip community-list expanded BAD_COMMS permit 20.*
!
route-map FOO permit 10
set comm-list BAD_COMMS delete
!
router bgp 10
neighbor 10.1.1.2 route-map FOO in
!
qct-ly6-04# clear ip bgp * soft in
qct-ly6-04# show ip bgp 10.1.3.0/24
BGP routing table entry for 10.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
10.1.1.2 (metric 20) from 10.1.1.2 (10.1.1.2)
Origin IGP, metric 0, localpref 100, valid, internal, best
Community: 1:1 1:2 1:3
Last update: Wed Mar 4 13:51:12 2015
qct-ly6-04#
qct-ly6-04#
We deleted all communities flagged as "permit" by the BAD_COMMS community-list
while leaving the ones matched by "deny 1:.*" alone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upon usage of a route-map statement in bgp, if the route-map does not exist
it turns into a implicit ALLOW, this causes issues in a wide variety
of scenarios.
Without this fix:
!
router bgp 100
bgp router-id 10.0.2.15
redistribute static route-map FOOEY
!
ip route 33.33.33.33/32 eth1
ip route 44.44.44.44/32 eth1
!
Now look at show ip bgp:
show ip bgp:
Network Next Hop Metric LocPrf Weight Path
*> 33.33.33.33/32 0.0.0.0 0 32768 ?
*> 44.44.44.44/32 0.0.0.0 0 32768 ?
With this fix:
show ip bgp:
Network Next Hop Metric LocPrf Weight Path
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com
|
|
|
|
|
|
|
|
|
| |
Coverity Scan #1221454
In zebra/interface.c if_data could be null dereferenced without early
check.
Signed-off-by: Morgan Stewart <morgan@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
| |
* ioctl commands can vary in type between systems, cast to an unsigned long
before passing to format command.
|
|
|
|
|
|
|
| |
Quagga start has unnecessary pim messages to stdout. Causing some confusion.
Logging is already saving this information in pimd.log
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
When caling pim_sock_open if the failure cause happens, however
unlikely, don't leak the fd on failure.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
Coverity Scan #709790
In zebra/rtadv.c: rtadv_make_socket leaks socket for error cases.
Added lines to close the socket for each error case or return.
Signed-off-by: Morgan Stewart <morgan@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
| |
While reading linux kernel netlink messages, rib->nexthop_num is incremented
in the read loop as well as the underlying nexthop_add() function call. This
number should only be incremented in one spot. Removing the increment from
the read loop and allowing the underlying code to track this data as it is
already.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
| |
I found that zebra doesn't set correct IPv6 address in its result because of
using *addr's address. Although I'm using 0.99.22, the latest version has
also use "&addr". Shouldn't it use "addr"?
Signed-off-by: Hiroshi Yokoi <hiroshi.yokoi.0313@gmail.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
The function vtysh_pam fails the build with --enable-werror enabled
because it is a static function not declared as such
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
| |
'show thread cpu ..' and 'show work-queues' are missing
from vtysh, but are available from telnet.
This commit adds these commands to the vtysh interface.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a runtime check to determine if netns are available. Some
systems like OpenWRT have the system call setns() but don't have the kernel
option CONFIG_NET_NS enabled.
Reported-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
| |
The arm cross compiler is issuing warnings for signed/unsigned
comparisons for ntohs. ntohs returns a unsigned int, while
the counting variables are signed. Fixed to allow -Werror
to work properly
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
The 'show memory XXXX' functionality is not used at all.
This removes the unused code
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
| |
Coverity Scan ID 23056. access is accessed after free in access_list_delete
Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
All functions that call zclient_read_header immediately turn around
and check to ensure that the version and marker fields are correct
Move this code into zclient_read_header
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have a cli like this:
"neighbor WORD interface {v6only}"
When in the cli you hit ? after entering v6only you get this:
tor-11(config-router)# neighbor swp1 interface v6only
% There is no matched command.
tor-11(config-router)# neighbor swp1 interface v6only
With this fix we now see:
tor-22(config-router)# neighbor swp1 interface v6only
<cr>
tor-22(config-router)# neighbor swp1 interface v6only
This behavior is now consistent with non-optional last
arguments.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
The default build needs vtysh and pimd as a default build so
that when a change is made we can catch build issues before they
become a problem.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
| |
peer_delete has been written to handle the peer->group pointer and
to remove the peer from the peer group if it exists upon deletion being
called. Shutdown/deletion Code was intentionally setting the peer-group
to NULL prior to calling peer_delete. This leaked the memory associated
with the peer->group because of refcnt accounting.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
Finding memory leaks associated with the peer data structure
is incredibly hard, add some code to allow you to find this
leaked code when needed.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
str2prefix_rd has a memory leak. This commit fixes that issue
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
| |
BGP packet handling creates a stream to handle data for an outgoing packet.
In some cases the code would create a new stream, add data, then duplicate
the stream and then free the original stream. This change removes
the unnecessary duplication, which entails a malloc and memcpy.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
In function bgp_aggregate_add, variables 'aspath' and 'community'
are malloced but not guaranteed to be freed before the function
returns.
Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
In bgp_delete(), variables 'node' and 'next' are overwritten in
the nested for loop.
Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
Coverity scan ID : 1302528. Calling "decode_label(pnt)" is only useful for its return value, which is
ignored. Removed the call.
Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
| |
This patch addresses David's comments and contains:
1.Addition of show ip bgp dampening command tree
2.Addition of show ip bgp dampening parameters to display BGP dampening
parameters.
Signed-off-by: Balaji.G <balajig81@gmail.com>
|