OpenSourceRouting
  1. OpenSourceRouting

srcdest

Public
AuthorCommitMessageCommit dateIssues
Sébastien LuttringerMartin WinterSébastien Luttringer
8bc284f4253vtysh: fix build against readline 6.3readline 6.3 removes some old deprecated funnily-named types. This updates vtysh to use the new types so it builds again. Reported-by: Joel Teichroeb <klusark@archlinux.invalid> References: https://bugs.archlinux.org/task/39495 Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Fix ported over form Mainline Quagga to fix Ubuntu 14.04 build
Christian FrankeChristian Franke
97703bfc264zebra: assume NEXTHOP_TYPE_IPV{4,6}_IFINDEX to be onlink
Christian FrankeChristian Franke
52b2ced5cfbzebra: treat deprecated addresses as non-existant
Christian FrankeChristian Franke
de3ecc6435dzebra: support static srcdest routesSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
d15fca4459dtests: add a test for the srcdest_table structureSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
8af4fe3c4dflib,zebra: refactor srcdest_table a bitSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
7d767f495cflib: suppport route_table_finish on srcdest_tableSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
d18bfb56b47lib: match route_node_lookup behavior with srcdest_rnode_lookupReturn NULL from srcdest_rnode_lookup if the found route_node has rn->info == NULL. This is to match the behavior of route_node_lookup. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
93ea34b0be9lib: fix a refcounting issue in src_node_lookupSigned-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
873a3f32609lib,zebra: move srcdest_table from zebra_rib into libzebra- make srcdest routing table reusable by putting it into lib - make the srcdest routing table structure more opaque - implement a srcdest routing table iterator Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian FrankeChristian Franke
7f83bff7eaazebra: fix support for ifindex src-dest routesSigned-off-by: Christian Franke <nobody@nowhere.ws>
Christian FrankeChristian Franke
a0f670002b0zebra: cleanup srcdest routes when client disconnectsSigned-off-by: Christian Franke <nobody@nowhere.ws>
David LamparterDavid Lamparter
1e49ce76965TODO: zebra: show commands for srcdest
David LamparterDavid Lamparter
c3166997388zebra: netlink: add srcdest route supportThis implements processing the RTA_SRC attribute on routes received from kernel, passing along the source prefix to the RIB functions, and adds the attribute on updates to the kernel. NB: "src" was in use as variable name for the "prefsrc" attribute on routes, which indicates the preferred source address for IPv4. These variables have been renamed to "prefsrc". Signed-off-by: David Lamparter...
David LamparterDavid Lamparter
076e55a68b6zebra: send/use srcdest source prefix in ZAPI/RIBNow that we can represent sourcedest routes, this fixes up the RIB's usage of prefix data and passes source information down into the kernel calls and out on ZAPI. TODO: test on *BSD (NOT compile-checked!)
David LamparterDavid Lamparter
411006f2825*: read and ignore srcdest routes on ZAPISince zebra might be sending srcdest routes down to the various daemons, they need to understand the presence of the field at the very least. Sadly, that's also the best we can do at this point since none of the protocols has support for handling srcdest routes. The only consistent thing to do is to ignore them throughout. If an administrator wants to have the srcdest route as non-srcdest in ...
David LamparterDavid Lamparter
fb92f518955zebra: add srcdest helpers & debugThis introduces a helper function to get source and destination prefix from a given route node (which can be either a destination or a source route), and extends route node debug logging function. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
b157aaf8e14zebra: add second-level route_table for srcdestIPv6 srcdest routes need to be keyed by both destination and source prefix. Since the lookup order is destination first, the simplest thing to do here is to add a second route_table to destination entries, which then contain source entries. Sadly, the result is somewhat confusing since a route_node might now be either a source node or a destination node. Signed-off-by: David Lamparter <equin...
David LamparterDavid Lamparter
201f9b981celib: add route_node_lookup_maynullThe sourcedest code needs to get the route_node even if its info pointer is NULL (which occurs when there are srcdest routes, but no general destination route.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
933b72406d2lib: send ZAPI IPv6 source prefixThis introduces ZAPI_MESSAGE_SRCPFX, and if set adds a source prefix field to ZAPI IPv6 route messages sent from daemons to zebra. The function calls all have a new prefix_ipv6 * argument specifying the source, or NULL. All daemons currently supply NULL. Zebra support for processing the field was added in the previous patch, however, zebra does not do anything useful with the value yet. Sig...
David LamparterDavid Lamparter
0b717f51583zebra: receive ZAPI IPv6 source prefixCheck and read the IPv6 source prefix on ZAPI messages, and pass it down to the RIB functions (which do nothing with it yet.) Since the RIB functions now all have a new extra argument, this also updates the kernel route read functions to supply NULL. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
f66258891e6zebra: factor out rib debug logsIntroduces a logging function that takes a struct route_node * argument, and prefixes log output with that node's prefix. While this removes some duplication, it will also later be useful for srcdest route nodes. Behaviour before and after the patch should be exactly identical. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Ken WilliamsDavid LamparterKen Williams
24c84dbe806zebra: Change the mechanism for comparing route ID's.The current format uses subtraction of two ints. Unfortunately, the subtraction method does not work for all combinations of numbers. For example, the with numbers represented by 10.x.x.x and 192.x.x.x, 10.x.x.x - 192.x.x.x will yield a very large positive number indicating that 10.x.x.x is larger. Signed-off-by: Ken Williams <kenneth.j.williams@intel.com> Acked-by: Feng Lu <lu.feng@6wind.com>...
Christian FrankeDavid LamparterChristian Franke
4becea724cclib: use heap to manage timersSigned-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
514991c7636lib: remove unused thread_master_debug functionSigned-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
ba32db1e854tests: Add tests for timersSigned-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
6f2a67031cfospfd/ospf_vty.c: use keyword cmd styleUse the new keyword command style for: - default-information originate - distance ospf - redistribute Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
cd40b329a2elib/command.c: rewrite command matching/parsingAdd support for keyword commands. Includes new documentation for DEFUN() in lib/command.h, for preexisting features as well as new keyword specification. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
e712d0e3667tests: fix build & disable testcommandsThe perils of having tests, the test wasn't tested thoroughly enough... Fixup various automake problems, and then disable it since it depends on configure parameters in its current version. For 0.99.24 we can ship a static copy of vtysh_cmd.c and have it reenabled. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
8f399b0e4fftests: add a test program for lib/command.cSigned-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
2b00515a9b6bgpd, ospfd, zebra: fix some DEFUN definitionsFixup some DEFUNS with incorrect command strings or mixed up helpstrings. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
f7bf41534e8zebra: apply syntactic sugar to rib_dump()strip the explicit __func__ present on all calls and make the prefix argument a transparent union. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Brett CipheryDavid LamparterBrett Ciphery
db19c85679bzebra: set metric for directly connected routes via netlink to 0a value of 1 is hard coded for the metric field, much like the ifconfig utility it may have roots in. in order to be in line with the metric used in the linux kernel itself, we switch this to 0. Signed-off-by: Brett Ciphery <brett.ciphery@windriver.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
98a59492d91build: remove now-useless --{en, dis}able-testscommit d771020 "don't build tests unless make check is run" has made the --{en,dis}able-tests switch completely useless. The differentiation is now made by running "make check" or not doing so. The only effect of the switch is an "empty" excursion of make into the tests/ directory. (well, and it turns "make check" useless from the main directory if --disable-tests is given, which I don't t...
David LamparterDavid Lamparter
8c99b4c11e6build: improve backtrace support/detectionlibexecinfo is used to provide backtrace() on *BSD. The API is compatible with glibc's, so this is a "free" improvement. To improve configure behaviour, the following configure options are modified/introduced: * --enable-gcc-rdynamic now defaults to "on" if the compiler is gcc. (I sadly wasn't able to find any documentation on the availability of this option for llvm, even though at leas...
Jorge Boncompte [DTI2]David LamparterJorge Boncompte [DTI2]
af514777f43lib: fix possible off-by-one in stream_put_prefix()The STREAM_WRITEABLE() call only checks if there is space for the prefix in the stream but does not account for the prefixlen. The stream_putc() call reduces available space by 1 and we can end copying one byte too much and with "endp" off by one if we are near the buffer end. Instead of moving the stream_putc() call before STREAM_WRITEABLE(), we check before hand for the required space, and o...
Jorge Boncompte [DTI2]David LamparterJorge Boncompte [DTI2]
6d729eeac91lib: fix for dynamically grown hashesFixes commit 97c84db00c (hash: dynamically grow hash table). The no_expand field it's not initialized and could make the hashes to never grow the table index. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Acked-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
4d474fa3297lib: fix backtraces broken by 837d16c...837d16c ("*: use array_size() helper macro") accidentally changed one of the expressions in the backtrace code, which afterwards read: zlog_backtrace_sigsafe(): if (((size = backtrace(array,array_size(array)) <= 0) || which boils down to: (size = backtrace(...) <= 0). The braces were intended to go: (size = backtrace(...)) <= 0. All in all, this makes a nice textbook example of the ...
Christian FrankeDavid LamparterChristian Franke
c78a46c27f6ospf6d: fix refcounting in ospf6_asbr_lsa_removeWhen iterating over a list, also the last node should be unlocked again. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Vincent BernatDavid LamparterVincent Bernat
fd5006896fcospf6d: add "auto-cost reference-bandwidth" commandThis command allows the user to change to default reference bandwidth for cost calculations. The default value is 100 Mbps. With a default bandwidth of 10 MBps, the default cost becomes 10. Those values are consistent with OSPFv2. [DL: resolved conflicts in vty command additions & docs] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Vincent BernatDavid LamparterVincent Bernat
c19543b223dospf6d: compute interface cost from its bandwidthPreviously, the interface cost was a fixed default value that a user was allowed to change with "ipv6 ospf6 cost XX". As what is done with OSPFv2, we change this behaviour to compute the default interface cost from the interface bandwidth. The user can still force a cost with "ipv6 ospf6 cost XX". He can get the default value with "no ipv6 ospf6 cost". Moreover, the default cost value was 1. T...
Ingo FlaschbergerDavid LamparterIngo Flaschberger
1db65fadf62ospf6d: solve segfaults with ospf6d on FreeBSDDo not send ospf6d hellos on fresh created interfaces without configuration (ie. no vlan configured). Ospf6d use ip6_mtu, if it's not initalised, Ospf6d tries to alloc indefinite size of memory. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
e708ed69aa0MMerge volatile/cumulus_ospf6dSigned-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
424cc3bd48dospf6d: fix interface_down() stopping hellosinterface_down() - which also handles some nonobvious cases like the last linklocal address disappearing - was previously not cancelling the hello timer. This had the effect of multiple such threads ending up scheduled after a quick down-up cycle. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
11b4f013557ospf6d: clear lsa->refresh before clearing LSAsThis fixes a SEGV when we receive a higher-SeqNum copy of a LSA that we originated ourselves, before a reboot of ospf6d. We create a new copy of the LSA to resync the SeqNum, but then half an hour later the old refresh thread ends up trying to refresh the free()'d old LSA. The SEGV is triggered by this chain: ospf6_lsdb_maxage_remover -> thread_execute(ospf6_lsa_refresh) -> old->refr...OSPFV3-16
Christian FrankeDavid LamparterChristian Franke
b13c1d9299dospf6d: handle missing link local address more gracefullyospf6 can't run on an interface without a link local address. Don't start the state machine when an interface comes up without such an ip and bring it up later, when a usable link local address is added. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeDavid LamparterChristian Franke
d9628728e09ospf6d: improve ordered shutdownImprove the _disable/_enable infrastructure so it gets into a more usable shape and make 'no router ospf6' actually work. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Remi GacogneVincent JARDINRemi Gacogne
a11e012e866security: Fix some typos and potential NULL-derefThis patch against the git tree fixes minor typos, some of them possibily leading to NULL-pointer dereference in rare conditions. Signed-off-by: Remi Gacogne <rgacogne-github@coredump.fr> Signed-off-by: Joachim Nilsson <troglobit@gmail.com> Acked-by: Feng Lu <lu.feng@6wind.com>
Christian FrankeDavid LamparterChristian Franke
b52aef18a9fzebra: log routes w/o gateway in rib_delete_ipv4Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Christian FrankeVincent JARDINChristian Franke
23f5f7c3dd8zebra: match gateway when deleting NEXTHOP_IPV4_IFINDEX routesSigned-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Feng Lu <lu.feng@6wind.com>