| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This hook will be called whenever a route is added, updated or
deleted. It will be used, for instance, by the SR code to keep
Prefix-SIDs in sync with their associated routes.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
| |
For better modularity, isis_zebra.c should only contain code used
to communicate with zebra. The management of route flags belongs
to isis_route.c.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
| |
This unification allows us to write code that works for both IPv4 and
IPv6, reducing duplication.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
| |
Nothing special here.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
| |
These null checks don't make sense because a) these two functions
are never called with a NULL IP address and b) the same pointers are
dereferenced later without any protection. Remove these NULL checks
to make the code less confusing.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
| |
These fields were introduced by commit e38e0df01ad, but they were
never put to any use. Remove them.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
| |
attempt to fix #4399
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
|
|
|
|
|
|
|
|
| |
Historically, isisd has been carrying around its own red-black tree to
manage its LSP DB in. This replaces that with the newly-added
DECLARE_RBTREE_*. This allows completely removing the dict_* code.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
| |
ISO C forbids ‘return’ with expression, in function returning void.
Signed-off-by: F. Aragon <paco@voltanet.io>
|
|
|
|
| |
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
|
| |
This fixes multiple issues and inefficiencies regarding the usage of
route_tables in isis_route.c and removes some memory leaks.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
| |
Take the source-prefix sub-TLV into consideration when running SPF
and support creation/deletion of dst-src routes as result.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This addresses two issues for L1L2 operation:
a) If an L1 route has ROUTE_ACTIVE unset and an L2 route for the same
destination has ROUTE_ACTIVE set, isisd would still put the L1 route
into the merged table. This causes the route for the destination to
get uninstalled from zebra until the next SPF run, which is incorrect.
To fix this, look at the ROUTE_ACTIVE flag and allow L2 routes to win
against L1 routes, when the L1 has ROUTE_ACTIVE unset.
b) If an L1 route wins against an existing L2 route, the ZEBRA_SYNCED
flag would remain on the L2 route. This leads to the problem that when
the L1 route disappears again, the L2 doesn't get reinstalled, since
isisd assumes it's already in the RIB because ZEBRA_SYNCED is set.
Solve this by clearing ZEBRA_SYNCED on L2 routes, if they lose against
an L1 route.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
|
| |
As isisd's route_tables are directly related to spf trees, move
the route tables into the spftree instead of maintaining them
alongside of the spftrees.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following types are nonstandard:
- u_char
- u_short
- u_int
- u_long
- u_int8_t
- u_int16_t
- u_int32_t
Replace them with the C99 standard types:
- uint8_t
- unsigned short
- unsigned int
- unsigned long
- uint8_t
- uint16_t
- uint32_t
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
| |
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the list_delete(struct list *) function to use
struct list **. This is to allow the list pointer to be nulled.
I keep running into uses of this list_delete function where we
forget to set the returned pointer to NULL and attempt to use
it and then experience a crash, usually after the developer
has long since left the building.
Let's make the api explicit in it setting the list pointer
to null.
Cynical Prediction: This code will expose a attempt
to use the NULL'ed list pointer in some obscure bit
of code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
There is no point in building a multipath route via one neighbor
if there is only one link to the neighbor, but the neighbor has
multiple IPs on that link. So only create one nexthop per link.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
| |
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
| |
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
| |
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header. (The style with * at the beginning won out with
580 to 141 in existing files.)
Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
| |
When in error path clean up the route table
created.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|\ |
|
| | |
|
|/
|
|
| |
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have a fix for 2 segmentation fault scenarios on the isis daemon:
1. When running a command "isis passive" on an interface in the
following context:
"end"
"configure terminal "
"interface dummy0"
"isis passive"
The trace back collected:
isis_adjacency.c:521
family=2,
root_sysid=0x20aee6d0 "", parent=0x20af4d68) at isis_spf.c:999
sysid=0x20aee6d0 "")
at isis_spf.c:1217
isis_spf.c:1372
isis_lsp.c:416
isis_lsp.c:1660
isis_main.c:368
The fix location:
file name: isisd/isis_adjacency.c
routine name: isis_adj_build_up_list
2. When deleting the existing isis router instance:
"end"
"configure terminal "
"no router isis DEAD"
The fix location:
isisd/isis_events.c, routine circuit_resign_level
isisd/isis_lsp.c, routine lsp_destroy
isisd/isis_route.c, isis_route_validate
The trace back collection:
"DEAD") at isisd.c:252
argc=1, argv=0xbfc39054) at isisd.c:1520
vty=0x20d6f528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368
and
"DEAD") at isisd.c:260
argc=1, argv=0xbfd6cf54) at isisd.c:1520
vty=0x208cb528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368
The patch is included.
patchwork #833: http://patchwork.quagga.net/patch/833/
|
|
|
|
| |
(cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)
|
|
|
|
| |
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
|
|
|
|
|
|
|
| |
During CR for nexthop upstream it was noticed that usage
of prefix2str was not consistent. This fixes this problem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this fixes a bunch of issues found by Coverity SCAN and flagged as
"high" impact -- although, they're all rather minute issues.
* isisd/isis_adjacency.c: one superfluous check, one possible NULL deref
* isisd/isis_circuit.c: two prefix memory leaks
* isisd/isis_csm.c: one missing break
* isisd/isis_lsp.c: one possible NULL deref
* isisd/isis_pfpacket.c: one error-case fd leak
* isisd/isis_route.c: one isis_route_info memory leak
* isisd/isis_routemap.c: one... fnord
* isisd/isis_tlv.c: one infinite loop
Reported-by: Coverity SCAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
2006-12-08 Hannes Gredler <hannes@gredler.at>
* isis_adjacency.c: (isis_new_adj) Allow NULL snpa argument.
* isis_pdu.c: (various) Update calls to isis_new_adj() to pass
NULL and use default.
* (general) Add forward declarations where required.
Fix up const char *'s.
Allow V4-only compilation.
|
|
|
|
|
|
|
|
|
|
|
| |
2005-11-20 Paul Jakma <paul.jakma@sun.com>
* (general) remove includes of very common system headers,
these are already picked up by zebra.h. Further, including
them before zebra.h messes up all our lovely (sarcasm)
autoconf'd detecting of platform specific things. Recent
addition of stdint.h to configure.ac and zebra.h appears
particularly to throw up this problem.
|
|
|
|
|
|
|
|
|
|
| |
* isis_events.c: Stop pseudo LSP thread while resigning circuit from
level.
* isis_route.c: Fix compiling with EXTREME_DEBUG. Mark route as not
in sync with zebra if it's changed.
* isis_spf.c: Schedule route validating etc even if tent was empty.
It's probably because we just don't have any adjacencies.
* isisd.c: Write minimum spf interval into configuration.
|
|
|
|
| |
* isis_route.c: fix EXTREME_DEBUG compilation
|
|
|
|
|
|
| |
Replace XMALLOC + memset with XCALLOC. Fix some indentation issues.
The only really significant change is simplified isis_delete_adj
function in isis_adjacency.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ISIS_ROUTE_FLAG_ACTIVE flag before running SPF.
* isisd.[ch]: Separate route tables for different levels. SPF is done
separately, but in case of L1L2 area they have to be merged.
* isis_zebra.c: Set/unset ISIS_ROUTE_FLAG_ZEBRA_SYNC flag correctly in
case of adding/removing IPv4 routes.
* zebra_route.c: Rework route validating process. Merging L1 and L2
tables in case of L1L2 area.
In short - many changes to make SPF work more correctly, add/remove
to/from RIB also works now. It's still very far from perfect though.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* (global): Fix up list loops to match changes in lib/linklist,
and some basic auditing of usage.
* configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES
* HACKING: Add notes about deprecating interfaces and commands.
* lib/linklist.h: Add usage comments.
Rename getdata macro to listgetdata.
Rename nextnode to listnextnode and fix its odd behaviour to be
less dangerous.
Make listgetdata macro assert node is not null, NULL list entries
should be bug condition.
ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use
with for loop, Suggested by Jim Carlson of Sun.
Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the
"safety" of previous macro.
LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to
distinguish from the similarly named functions, and reflect their
effect better.
Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section
with the old defines which were modified above,
for backwards compatibility - guarded to prevent Quagga using it..
* lib/linklist.c: fix up for linklist.h changes.
* ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single
scan of the area list, rather than scanning all areas first for
INTER_ROUTER and then again for INTER_NETWORK. According to
16.2, the scan should be area specific anyway, and further
ospf6d does not seem to implement 16.3 anyway.
|
|
|
|
| |
functions and some tiny related fixes. No functional changes.
|
| |
|
| |
|
| |
|
| |
|
|
|