OpenSourceRouting
  1. OpenSourceRouting

quagga-snap

Public
AuthorCommitMessageCommit dateIssues
Donald SharpPaul JakmaDonald Sharp
f3734dd5fc0pimd: Cleanup zebra debugs to be protected by debug commandspimd 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>
Donald SharpPaul JakmaDonald Sharp
0cee0384f6cpimd: Do not display some default values as part of a show runThere 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@cumulusn...
Donald SharpPaul JakmaDonald Sharp
6169559976btests: Fix warnings from test-stream.ctest-stream is generating some compiler warnings Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald SharpPaul JakmaDonald Sharp
26a18eb223dquagga: Additional centos 6 -enable-werror fixesThis 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>
Donald SharpPaul JakmaDonald Sharp
d8aa4beab72vtysh: Fix Quagga.conf file read in.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 al...
Donald SharpPaul JakmaDonald Sharp
7125293d65dlib: zclient.c remove extern struct thread_master *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@cumulusnetwork...
Donald SharpPaul JakmaDonald Sharp
fd1c1a133afgit: add (generated) cscope files to .gitignore
Donald SharpPaul JakmaDonald Sharp
9fb73e8790avtysh: Allow display of individual daemons configsWhen 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>
Paul JakmaPaul Jakma
67c3d75f532HACKING: Change format to MarkDown* 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 th...
Paul JakmaPaul Jakma
3e71e369452HACKING: rename to HACKING.md in prep for conversion to MarkDown
Michael RossbergPaul JakmaMichael Rossberg
ca8ec20b017ospf6d: Fix for fast OSPF convergenceFixed use of OSPF_MIN_LS_ARRIVAL, which changed its unit from seconds to milliseconds
Daniel WaltonPaul JakmaDaniel Walton
d3ac733b41bbgpd: 'set comm-list delete' stops as soon as it hits a community-list entry 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 ...CM-3513
Daniel WaltonPaul JakmaDaniel Walton
1994dc81458bgpd: If route-map does not exist DENY for redistribute statementsUpon 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 ...
Morgan StewartPaul JakmaMorgan Stewart
c8394ace708Fixed if_add_update possible null dereferenceCoverity 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>
Paul JakmaPaul Jakma
75daab1784fpimd: Fix compile warning (error with Werror) on BSD* ioctl commands can vary in type between systems, cast to an unsigned long before passing to format command.
Donald SharpPaul JakmaDonald Sharp
e472b8a5141pimd: Remove stdout zlog changesQuagga 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>
Donald SharpPaul JakmaDonald Sharp
44d03fd59ebpimd: Fix leaked fdWhen 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>
Morgan StewartPaul JakmaMorgan Stewart
26b663da7eazebra: Fix leaked sockets in rtadv.cCoverity 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>
Donald SharpPaul JakmaDonald Sharp
782c882077bzebra: rib->nexthop_num is double incrementedWhile 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>
Hiroshi YokoiPaul JakmaHiroshi Yokoi
8ccd74c29f5zebra: fix addr sent in ZEBRA_IPV6_NEXTHOP_LOOKUPI 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>
Donald SharpPaul JakmaDonald Sharp
8965be4baaavtysh: allow --with-libpam to build with --enable-werrorThe 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>
Donald SharpPaul JakmaDonald Sharp
567a638fc7avtysh: Add missing show thread/work-queues commands'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>
Nicolas DichtelPaul JakmaNicolas Dichtel
04a3aabf58dvrf: add a runtime check before playing with netnsThis 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>
Donald SharpPaul JakmaDonald Sharp
0bc874b88cfbuild/arm: Arm compilation warning fixThe 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>
Donald SharpPaul JakmaDonald Sharp
fbc3e97d747lib: Remove unused 'show memory XXX' functionalityThe 'show memory XXXX' functionality is not used at all. This removes the unused code Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Denil ViraPaul JakmaDenil Vira
4fdb5f401eblib: Fix Free Pointer dereference in lib/filter.cCoverity Scan ID 23056. access is accessed after free in access_list_delete Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
Donald SharpPaul JakmaDonald Sharp
a9d4cb33faalib/zclient: Consolidate error reporting for zclient_read_headerAll 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>
Donald SharpPaul JakmaDonald Sharp
f733280419flib/command: Fix optional arguments with description interactionsIf 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 inter...
Donald SharpPaul JakmaDonald Sharp
e675678789bbuild: Enable vtysh and pimd as part of default buildThe 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>
Donald SharpPaul JakmaDonald Sharp
b3eeabee657bgpd: Fix 'struct peer' memory leakspeer_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>
Donald SharpPaul JakmaDonald Sharp
104576dcafebgpd: Add some peer_lock/unlock debug codeFinding 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>
Donald SharpPaul JakmaDonald Sharp
58a83f2f5dcbgpd: Warn user that bgp is setting maximum-paths larger than MULTIPATH_NUMIn 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...
Donald SharpPaul JakmaDonald Sharp
79969960aaebgpd: Fix small memory leak in str2prefix_rdstr2prefix_rd has a memory leak. This commit fixes that issue Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald SharpPaul JakmaDonald Sharp
a752c3be8c2bgpd: Remove unnecessary stream_dup callsBGP 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>
Denil ViraPaul JakmaDenil Vira
e2a9258c16bbgpd: Fix memory leak in bgpd/bgp_route.cIn 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>
Denil ViraPaul JakmaDenil Vira
57cd5e7a262bgpd: Variable reuse in bgpd/bgpd.cIn 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>
Denil ViraPaul JakmaDenil Vira
7053d8176cebgpd: Fix useless call in bgpd/bgp_mplsvpn.cCoverity 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>
BalajiPaul JakmaBalaji
3921cc54445bgpd: Addition of "show ip bgp dampening" command treeThis 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>
Timo TeräsPaul JakmaTimo Teräs
2820a01eed1bgpd: Make bgp_info_cmp robust to paths that do not have su_remote infoMy original su_remote == NULL check is not correct. It seems that * bgp_route.c: (bgp_info_cmp) Some bgp_info is compared with su_remote=NULL and it's supposed to be perfectly legal. E.g. configured subnet announces ("network a.b.c.d/n"). Ensure bgp_info_cmp is robust if such a path gets as far as the neighbour address comparison step.
Paul JakmaPaul Jakma
782fb077008bgpd: Compile fix for clearing-completion FSM fix, using workqueue helper.
Paul JakmaPaul Jakma
13c2a3db503lib/workqueue: Add trivial work_queue_is_scheduled helper
Paul JakmaPaul Jakma
e8441a81f6cbuild/lib: Check for and include stdbool.h by default* stdbool.h should be widely supported by now, and the 'bool' type makes more semantic sense than an integer type for boolean values.
Donald SharpPaul JakmaDonald Sharp
7ef4221c3f8bgpd: Fix race in clearing completionWhen a peer that is Established goes down, it is moved into the Clearing state to facilitate clearing of the routes received from the peer - remove from the RIB, reselect best path, update/delete from Zebra and to other peers etc. At the end of this, a Clearing_Completed event is generated to the FSM which will allow the peer to move out of Clearing to Idle. The issue in the code is that there...
Dinesh G DuttPaul JakmaDinesh G Dutt
234e5c8d5a3bgpd: Only use routes from Established peers for best path selectionEnsure that routes from a peer are not considered for best path comparison if the peer is not in an Established state. There can be a window between a peer being deleted and the background thread that actually clears the routes (marks them as "removed") runs during which best path may run. If this path selection compared two prefixes all the way down to peer IP addresses and one of these two pe...
vivekPaul Jakmavivek
bd4b7f1559abgpd: Ignore stale entry candidates during bestpath selection.During best path selection, if one of the candidates is a stale entry, do not perform the neighbor address comparison as that information is invalid for the stale entry. Attempting to perform the comparison results in a bgpd exception. Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Fernando SotoPaul JakmaFernando Soto
b6404390a71ospfd: trap on state change seems to send incorrect value for ospfNbrStateThe ospfNbrState in the ospf trap sent from ospfd shows an incorrect state. For example, when the connection goes down, the ospfNbrState in the trap is sent as '8' (full). When the connection is reestablished, the state is sent as '7' (loading). The reason seems to be that the trap is sent from nsm_notice_state_change() before the state is actually updated by calling nsm_change_state(). Aft...
Vystoropskyi, SergiiPaul JakmaVystoropskyi, Sergii
b075e8728f6ospfd: Fix for 'no' + 'debug command' does not disable 'debug command'"no debug ospf packet all detail" does not cancel "debug ospf packet all detail" due to the code inconsistency in setting/unsetting debug flags. * ospf_dump.c: added missing flags. Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Michael RossbergPaul JakmaMichael Rossberg
2ef762ed9b8ospfd: Fast OSPF convergenceWhen considering small networks that have extreme requirements on availability and thus convergence delay, the timers given in the OSPF RFC seem a little “conservative”, i.e., the delay between accepted LSAs and the rate at which LSAs are sent. Cisco introduced two commands 'timers throttle lsa all’ and 'timers lsa arrival’, which allow operators to tune these parameters. I have been writing ...
Paul JakmaPaul Jakma
c920e510d09ospfd: Fix bug in 94266fa822ba, nbr_self rebuild didn't add valid nbr_self* 94266fa822ba "ospfd: Self nbrs needs to be rebuilt when router ID changes." deleted the nbr_self, and added it back, but ospf_nbr_add_self doesn't actually create the nbr_self - it assumes it's already there. Leading to use after free and crashes after a router-id change. * ospfd/ospf_neighbor.{c,h}: (ospf_nbr_self_reset) Little helper to reset the nbr_self correctly. * ospf_interface...
Nicolas DichtelPaul JakmaNicolas Dichtel
794c4735f81bgpd/pimd: fix zAPI parsingCommit c99f3481a598 has changed the API. Now, the vrfid has been added in the header, thus we must read it before parsing the rest of the message. To ease code maintenance, let's add a new function to read a zAPI header. Fixes: c99f3481a598 ("*: add VRF ID in the API message header") Reported-by: Martin Winter <mwinter@opensourcerouting.org> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wi...