summaryrefslogtreecommitdiffstats
path: root/ospf6d (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: track version & "defaults" in configsDavid Lamparter2017-03-281-1/+6
| | | | | | [CF]: Move default name to autoconf and update tests Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* ospf6d: Fix compile warningsDonald Sharp2017-02-031-1/+1
| | | | | | | These compile issues were found by running ./buildtest.sh on a fedora 25 box. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: Convert libzebra -> libfrrDonald Sharp2017-02-031-1/+1
| | | | | | | The library libzebra that is installed with FRR will conflict with Quagga. So let's rename it to libfrr. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: fix warning fallout from set_socket_pathDavid Lamparter2017-02-011-1/+1
| | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: Add vty_socket cli option to override the compiled-in location for ↵Martin Winter2017-01-251-1/+11
| | | | | | the VTY Socket Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
* ospf6d: resolve problem with area range lsid creationDon Slice2017-01-034-31/+3
| | | | | | | | | | | | | | | | | | | | The problem reported was that routers downstream from the ABR would have prefixes in the IPv6 rib that should have been summarized. Testing showed that the prefixes were absent in the lsdb but not removed from the rib. The problem (and others) stemmed from determining the link-state id to use for the area-range statement only from other entries in the range-table. Since the area range statement creates inter-prefix LSAs (summaries) which are in all aspects identical to other inter-prefix LSAs, the number space for the lsid needs to be unique across all inter-prefix LSAs, not just unique between area range statements. This fix removes the use of range-table specific lsids and acquires the lsid just as any other inter-prefix LSA. Ticket: CM-13626 Signed-off-by: Don Slice Reviewed By: CCR-5489 Testing Done: Manual testing, repeated runs of the test that previously failed, ospf-smoke
* build: rename (2 of ?): route_types macrosDavid Lamparter2016-12-201-8/+8
| | | | | | | All of the autogenerated macros in lib/route_types.pl are now called FRR_* instead of QUAGGA_*. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: rename (1 of ?): configure.ac + preprocDavid Lamparter2016-12-201-6/+6
| | | | | | | This replaces Quagga -> FRR in most configure.ac settings as well as a handful of preprocessor macros in the source code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: always set SO_SNDBUF and SO_RCVBUF using a best effort approachRenato Westphal2016-12-081-36/+2
| | | | | | | | | | | If we fail to set any socket's buffer size, try again with a smaller value and keep going until it succeeds. This is better than just giving up or, even worse, abort the creation of a socket (ospf6d and ripd). Fix broken ospf6d on FreeBSD. Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: massively remove needless checksDavid Lamparter2016-11-151-2/+0
| | | | | | | | | | 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>
* ospf6d: fix off-by-one on display of spf reasonsChristian Franke2016-10-211-1/+1
| | | | | | | | The loop should only iterate to array_size - 1. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: implement admin distanceMaitane Zotes2016-10-204-0/+362
| | | | | | | | Until today the admin distance cannot be configured for any IPv6 routing protocol. This patch implements it for ospf6. Signed-off-by: Maitane Zotes <maz@open.ch> Signed-off-by: Roman Hoog Antink <rha@open.ch>
* *: Fix duplicate commands from view/enable node consolidationPaul Jakma2016-10-201-37/+0
|
* *: Consolidate routemap initializationDonald Sharp2016-10-191-1/+1
| | | | | | | | Consolidate the routemap initialization into one function. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* *: Consolidate all double VIEW_NODE and ENABLE_NODE'sDonald Sharp2016-10-087-32/+0
| | | | | | | | If a command is put into the VIEW_NODE, it is going into the ENABLE_NODE as well. This is especially true for show commands. As such if a command is in both consolidate it down to VIEW_NODE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: add support for route tagsChristian Franke2016-10-084-11/+203
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* Make route flags a 32bit fieldChristian Franke2016-09-231-1/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* lib: Check prefix length from zebra is sensiblePaul Jakma2016-09-231-1/+1
| | | | | | | | | | | | | * zclient.c: prefix length on router-id and interface address add messages not sanity checked. fix. * */*_zebra.c: Prefix length on zebra route read was not checked, and clients use it to write to storage. An evil zebra could overflow client structures by sending overly long prefixlen. Prompted by discussions with: Donald Sharp <sharpd@cumulusnetworks.com>
* ospf6d: fix fallout from ifindex_t changeDavid Lamparter2016-09-231-1/+2
| | | | | | | Only one of these variables is in fact an interface index... (this fixes -Werror build.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Revert "Make route flags a 32bit field"Donald Sharp2016-09-231-1/+1
| | | | This reverts commit 85eda2c98520a9553bdc05c136618f9d04917e9b.
* Make route flags a 32bit fieldChristian Franke2016-09-231-1/+1
| | | | Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* *: remove dead codeRenato Westphal2016-09-231-4/+0
| | | | | | | | Since recently zebra uses only the ZEBRA_REDISTRIBUTE_* messages to advertise redistributed routes to its clientes. Now the old ZEBRA_IPV*_ROUTE_* messages are only used for client->zebra communication. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: split & distribute memtypes and stop (re|ab)using lib/ MTYPEsDavid Lamparter2016-09-195-4/+99
| | | | | | | | | | | | | | | | | | | This is a rather large mechanical commit that splits up the memory types defined in lib/memtypes.c and distributes them into *_memory.[ch] files in the individual daemons. The zebra change is slightly annoying because there is no nice place to put the #include "zebra_memory.h" statement. bgpd, ospf6d, isisd and some tests were reusing MTYPEs defined in the library for its own use. This is bad practice and would break when the memtype are made static. Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> [CF: rebased for cmaster-next] Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* lib: migrate to new memory-type handlingDavid Lamparter2016-09-191-0/+1
| | | | | | | | | Move over to the new allocation counting added in the previous commit. (This commit is mostly mechanical.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
* quagga-reload.py fails for "net add debug ospf6 lsa as-ext"Daniel Walton2016-09-081-4/+4
| | | | | | | | | | | Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-12773 - change "as-ext" to "as-external" - drop "grp-mbr" option, it does not have a handler - drop "type7" option, it does not have a handler
* Merge remote-tracking branch 'origin/cmaster' into cmaster-nextDonald Sharp2016-08-191-1/+3
|\
| * Fix for CM-12450 Ensure quagga logs at startup are sent to syslog (until log ↵Sid Khot2016-08-181-1/+3
| | | | | | | | | | | | | | | | configuration is processed) Ticket: CM-12450 Reviewed By: CCR-5112 Testing Done: Manual
* | *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-08-1814-29/+30
| | | | | | | | (cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
* | ospf6d: fix sendmsg on OpenBSDRenato Westphal2016-08-081-5/+9
|/ | | | | | | | | | | When sending ancillary data on OpenBSD, we need to tell the compiler that the ancillary data buffer should be aligned on the stack to the minimum alignment of the first ancillary data object that will be sent. Additionally, HAVE_SIN6_SCOPE_ID is not defined anywhere, check for HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
* *: snmp: add a load of "static" specifiersDavid Lamparter2016-07-281-3/+3
| | | | | | | Make it easier to see which bits in *_snmp.c are actually referenced from non-SNMP parts of the code. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* *: fixup snmp supportDavid Lamparter2016-07-241-3/+5
| | | | | | | | - HAVE_POLL is overloaded by net-snmp - missing includes - ospf6_snmp converted to vrf_iflist() Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Merge remote-tracking branch 'origin/cmaster' into cmaster-nextDonald Sharp2016-07-132-3/+4
|\
| * bfd: Fix for missing BFD client regs/deregs from quagga clientsradhika2016-06-212-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket: CM-11256 Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com> Testing: Unit, PTM smoke, OSPF smoke, BGP Smoke Issue: BFD client registrations are not being sent to PTM from BGP/OSPF clients when the quagga clients have no BFD configuration. This can create stale BFD sessions in PTM when BFD is removed from quagga configuration before quagga is restarted. BFD client de-registrations from BGP/OSPF also go missing sometimes when quagga is restarted. This also will cause stale BFD sessions in PTM. Root Cause: BFD client registrations were being sent at the time of BGP/OSPF daemon initialization. But, they were being sent to zebra before the socket connection between zebra and BGP/OSPF was established. This causes the missing BFD client registrations. BFD client de-registrations are sent from zebra when zebra detects socket close for BGP/OSPF daemons. Based on the timing, the de-registrations may happen after socket between PTM and zebra is closed. This will result in missing de-registrations. Fix: Moved sending of BFD client registration messages to zebra connected callback to make sure that they are sent after the BGP/OSPF daemons connect with zebra. Added BFD client de-registrations for BGP/OSPF to be also sent when zebra daemon gets restart signal. They are sent from the signal handler only if it was not already handled in zebra client socket close callback.
* | all: add default log file if none are definedDon Slice2016-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Added a default log file named /var/log/quagga/Quagga.log to every daemon to capture log entries if no log file is defined. This also allows the capture of logged information prior to reading each daemon's config file. If a log file is defined manually, it will override this default file name. Ticket: CM-10987 Signed-off-by: Don Slice Reviewed By: Donald Sharp Testing Done: Manual testing
* | zebra/ospf/ospf6: Fix several memory leaks on if up/downDon Slice2016-06-282-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Resolved several memory leaks caused by ifdown/ifup the vrf device or a swp port. For bgp/zebra/ospf/ospf6, bouncing the vrf device would cause a linked list, Interface, and route-table to get leaked. For ospf6, bouncing the swp device also caused leaks of Connected and Prefix entries. Ticket: CM-10841 Signed-off-by: Don Slice Reviewed-By: Donald Sharp Testing Done: Manual testing, bgp and ospf mins passed, smokes had fewer failures than base
* | ospfd/ospf6d/zebra: Change interface bandwidth range and auto-cost range to 100GDon Slice2016-06-133-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change, interface bandwidth could not be defined above 10G. With the use of higher speed interfaces, the ability to effectively define the path links was highly impacted. Additionally, the default auto-cost reference-bandwidth for ospf and ospfv3 was set to 100M, which relects a much earlier time. Changed both the range of interface bandwidth definitions and reference bandwidths to be up to 100G. Set the default interface bandwidth (if not defined) to 10G to make the ratio continue to cause a cost of 10 as before. Manual testing as well as ospf-min and ospf-smoke passed successfully. Ticket: CM-10756 Signed-of-by: Don Slice Reviewed-by: Donald Sharp
* | ospf6d, bgpd: avoid calling if_nametoindexFeng Lu2016-06-091-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comments in if.h, it is better to call ifname2ifindex() instead of if_nametoindex(). And ifname2ifindex() can work for VRF by appending a parameter while if_nametoindex() can not. Signed-off-by: Feng Lu <lu.feng@6wind.com> Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 395828eea809e8b2b8c5824d3639cefedd7aa9f0)
* | ospf6d: use existing union, avoid strict-aliasingDavid Lamparter2016-06-081-4/+3
| | | | | | | | | | | | | | | | | | There are preexisting fields u.lp.id and u.lp.adv_router in struct prefix that do the same thing as these type-punning pointer derefs. Use these and shut up the strict-aliasing warnings. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 0de0138a9146074f268245193e45c9376d998722)
* | *: add missing includesDavid Lamparter2016-06-073-0/+4
| | | | | | | | | | | | | | | | Some places, particularly headers, were spewing warnings since they don't include neccessary other headers to get struct/enum definitions. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit 388f8857eb81ef75014060976776523a58a99389)
* | *: use void * for printing pointersDavid Lamparter2016-05-304-18/+24
| | | | | | | | | | | | | | | | | | On higher warning levels, compilers expect %p printf arguments to be void *. Since format string / argument warnings can be useful otherwise, let's get rid of this noise by sprinkling casts to void * over printf calls. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* | *: use long long to print time_tDavid Lamparter2016-05-303-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Since we can't assume time_t to be long, int, or even long long, this consistently uses %lld/long long (or %llu/unsigned long long in a few cases) to print time_t/susecond_t values. This should fix a bunch of warnings, on NetBSD in particular. (Unfortunately, there seems to be no "PRId64" style printing macro for time_t...) Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242)
* | Quagga: Fix code to use srandom/randomDonald Sharp2016-05-301-1/+1
| | | | | | | | | | | | | | | | Quagga was using a mix of srand/rand and srandom/random. Consolidate to use srandom/random which are the POSIX versions of random number generators Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* | build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2016-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org> (cherry picked from commit 237aac56960575f6ad2451ba2796d94bd5ae4b33)
* | build: remove INRIA, NRL and MUSICA IPv6 quirksDavid Lamparter2016-06-031-6/+0
| | | | | | | | | | | | | | | | | | Valar dohaeris. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* | Fix most compiler warnings in default GCC build.Paul Jakma2016-05-265-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lots of warnings. Some const and type-pun breaks strict-aliasing warnings left but much reduced. * bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to (struct fifo), so just use that. Makes it clearer the beginning of (struct bgp_advertise) is compatible with with (struct fifo), which seems to be enough for gcc. Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up type-punning breaks strict aliasing warnings. * bgp_packet.c: Use BGP_ADV_FIFO_HEAD. (bgp_route_refresh_receive) fix an interesting logic error in (!ok || (ret != BLAH)) where ret is only well-defined if ok. * bgp_vty.c: Peer commands should use bgp_vty_return to set their return. * jhash.{c,h}: Can take const on * args without adding issues & fix warnings. * libospf.h: LSA sequence numbers use the unsigned range of values, and constants need to be set to unsigned, or it causes warnings in ospf6d. * md5.h: signedness of caddr_t is implementation specific, change to an explicit (uint_8 *), fix sign/unsigned comparison warnings. * vty.c: (vty_log_fixed) const on level is well-intentioned, but not going to fly given iov_base. * workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always true for address of static variable. Correct but pointless warning in this case, but use a 2nd pointer to shut it up. * ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2 different 32 bit IDs into in (struct ospf6_route), and the resulting type-pun strict-alias breakage warnings this causes. Need to use 2 different fields to fix that warning? general: * remove unused variables, other than a few cases where they serve a sufficiently useful documentary purpose (e.g. for code that needs fixing), or they're required dummies. In those cases, try mark them as unused. * Remove dead code that can't be reached. * Quite a few 'no ...' forms of vty commands take arguments, but do not check the argument matches the command being negated. E.g., should 'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set? Or should it be required that the distance match the previously configured distance for the prefix? Ultimately, probably better to be strict about this. However, changing from slack to strict might expose problems in command aliases and tools. * Fix uninitialised use of variables. * Fix sign/unsigned comparison warnings by making signedness of types consistent. * Mark functions as static where their use is restricted to the same compilation unit. * Add required headers * Move constants defined in headers into code. * remove dead, unused functions that have no debug purpose. (cherry picked from commit 7aa9dcef80b2ce50ecaa77653d87c8b84e009c49) Conflicts: bgpd/bgp_advertise.h bgpd/bgp_mplsvpn.c bgpd/bgp_nexthop.c bgpd/bgp_packet.c bgpd/bgp_route.c bgpd/bgp_routemap.c bgpd/bgp_vty.c lib/command.c lib/if.c lib/jhash.c lib/workqueue.c ospf6d/ospf6_lsa.c ospf6d/ospf6_neighbor.h ospf6d/ospf6_spf.c ospf6d/ospf6_top.c ospfd/ospf_api.c zebra/router-id.c zebra/rt_netlink.c zebra/rt_netlink.h
* | ospf6d: fix uninitialized warning in SNMPDavid Lamparter2016-05-261-1/+1
| | | | | | | | | | Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit a4065069e6bdd0bc7475312530b0e9457f818e0d)
* | snmp: fix warningsDavid Lamparter2016-05-261-1/+0
| | | | | | | | | | | | | | batch-fix all warnings that come up when enabling AgentX SNMP support. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> (cherry picked from commit dfee58f1d41a2e36c7f5f38a3ef5712224131824)
* | Bug in ospf6_lsa_compare()Yasuhiro Ohara2016-05-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is probably correct on 32bit systems, but i think it will not work on 64bit systems. sizeof(signed long) would be 8 and therefore the cast from u_int32_t will map all the values to non-negative part of long int. You would like to use int (like in ospfd) and change the type of seqnuma, seqnumb to that. The type int32_t would be even more proper, but sizeof(int) is 4 on relevant platforms. Signed-off: Ondrej Zajicek <santiago@crfreenet.org> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Yasuhiro Ohara <yasu@jaist.ac.jp> (cherry picked from commit bdd8cd70a042473477f9144c9cedb8dde11ba2c1)
* | ospf6_lsdb: trivial, make it clear that showfunc is set before deref.Paul Jakma2016-05-262-15/+25
| | | | | | | | (cherry picked from commit 7bef33cbf5027189bd55e4890a07a6bef8277f93)
* | build: Remove the old PIC/PIE patch, let libtool sort it outPaul Jakma2016-05-261-2/+1
| | | | | | | | | | | | | | * Remove the old change from '08 to add in PIE arguments at automake level. Versions of libtool since then know how to deal with -fpie and do the right thing according to whether its building shared or executable objects. So just pass '-fpie' as CFLAG and let libtool do its thing.