| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code pattern:
for (ALL_LSDB(lsdb, lsa)) {
remove_lsa(lsa)
}
has a use after free in ALL_LSDB, since we ask for the next pointer,
after it has been freed.
Modify the code such that we grab the next pointer before we can
possibly free it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0f9f74baeb97f437d7acf7feda0f400d50943c4c.
This commit was causing crashes and the goal of this commit
was to make coverity sanity happy. I'd rather have coverity
sad and not have ospfv3 crash
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
| |
const const const your boat, merrily down the stream...
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
|
|
|
| |
the for (ALL_LSDB...) macro was iterating over lsa,
when lsa had just been freed in these functions.
Remove the macro and make the adjustments saving lsa_next
before the free.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
If the user configured an interface to be in a particular mode, we need
to be consistent about that. No looking at if_is_pointopoint() or
if_is_broadcast().
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
| |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
|
|
| |
No cast necessary for void *
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
We had a variety of issues with sorted list compare functions.
This commit identifies and fixes these issues.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
This serves no other purpose than to generate stupid warnings for
overwritten initializers on old gcc versions.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
|
|
|
|
|
|
| |
There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening. So we can safely remove all of this code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When neighbor state transition from LOADING to
FULL state, active full neighbors count incremented.
The full neighbors count is used for router-id change
if any full neighbor exist, displays message to restart
ospf6/frr to activate new router-id.
In the case of P-t-P neighbor type neighbor transition
from EXCHANGE to FULL which missed full neighbors count.
Ticket:CM-20574
Testing Done:
Initially, Bring up zebra assigned router-id in ospf6
with point-to-point link based neighbor.
Configure static router-id where restart of ospf6 message
is displayed.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initially INP LSA is originated, when connected
interface comes up. As neighbor is not up, LSA is
not transmitted but stored in DB.
As NSM transition to FULL, INP is scheduled but
ospf6_flood() would not originate the LSA as
current DB and new INP LSA same so it discards
the new LSA.
When Neighor becomes FULL, originate INP via
flushing current DB copy and generate new.
This is introduced as PR 1738 introduce,
premature aging of LSAs in nbr table as R1
going down. upon neigbor coming up, INP was
not updated to new age.
Ticket:CM-19926,CM-19945
Testing Done:
Topology R3 --- R1 -- R2, R1 have INP LSA.
After frr restart R2 and R3 re learnt R1's
INP LSA as new neighbor(s) come up.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
|
|
|
|
| |
Signed-off-by: Lou Berger <lberger@labn.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Notify user to store config and restart ospf6d
as part of router-id change cli if any of
the area active.
Store zebra router-id under ospf6, when static
router-id removed restore zebra router-id, ask
to restart ospf6d.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RFC 2328 (14.1) Premature aging of LSAs from
routing domain :
When ospf6d is going away (router going down),
send MAXAGEd self originated LSAs to all
neighbors in routing domain to trigger
Premature aging to remove from resepective LSDBs.
Neighbor Router Reboot:
Upon receiving Self-originate MAXAGEd LSA, simply
discard, Current copy could be non maxaged latest.
For neighbor advertised LSA's (current copy in LSDB)
is set to MAXAGE but received new LSA with Non-MAXAGE
(with current age), discard the current MAXAGE LSA,
Send latest copy of LSA to neighbors and update the
LSDB with new LSA.
When a neighbor transition to FULL, trigger AS-External
LSAs update from external LSDB to new neighbor.
Testing:
R1 ---- DUT --- R5
| \
R2 R3
|
R4
Area 1: R5 and DUT
Area 0: DUT, R1, R2, R3
Area 2: R2 R4
Add IPv6 static routes at R5
Redistribute kernel routes at R5,
Validate routes at R4, redistributed via backbone
to area 2.
Stop n start frr.service at R5 and validated
MAXAGE LSAs then recent age LSAs in Database at DUT-R4.
Validated external routes installed DUT to R4.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
GCC 7.1.1 returned warnings about buffer sizes
not being big enough to handle the full string
that could be generated.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
|
|
|
|
| |
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|\
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
| |
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
| |
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
| |
| |
| |
| | |
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|/
|
|
|
|
| |
... to make it easier to refactor all of the iteration uses.
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass pointer to pointer instead of assigning by return value. See
previous commit message.
To ensure that the behavior stays functionally correct, any assignments
with the result of a thread_add* function have been transformed to set
the pointer to null before passing it. These can be removed wherever the
pointer is known to already be null.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The way thread.c is written, a caller who wishes to be able to cancel a
thread or avoid scheduling it twice must keep a reference to the thread.
Typically this is done with a long lived pointer whose value is checked
for null in order to know if the thread is currently scheduled. The
check-and-schedule idiom is so common that several wrapper macros in
thread.h existed solely to provide it.
This patch removes those macros and adds a new parameter to all
thread_add_* functions which is a pointer to the struct thread * to
store the result of a scheduling call. If the value passed is non-null,
the thread will only be scheduled if the value is null. This helps with
consistency.
A Coccinelle spatch has been used to transform code of the form:
if (t == NULL)
t = thread_add_* (...)
to the form
thread_add_* (..., &t)
The THREAD_ON macros have also been transformed to the underlying
thread.c calls.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
|
|
|
| |
This means there are no ties into the SNMP code anymore other than the
init call at startup.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
| |
This is largely a bulk-replace made with coccinelle.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
| |
Replace with monotime() [which is not cached].
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the State/IfState column, we were reserving only 6 characters to
print the state of each neighbor, but this is not enough for cases like
"Loading" (7 characters) and "ExChange" (8 characters). Increase the
width of this field to 8 to fix the broken indendation.
ospf6d's output before this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID Pri DeadTime State/IfState Duration I/F[State]
2.2.2.2 1 00:00:35 ExChange/DR 00:01:15 rt1-eth0[BDR]
3.3.3.3 1 00:00:35 Loading/DR 00:01:15 rt1-eth1[BDR]
4.4.4.4 1 00:00:35 Full/DR 00:01:15 rt1-eth2[BDR]
5.5.5.5 1 00:00:35 None/DR 00:01:10 rt1-eth3[BDR]
6.6.6.6 1 00:00:35 Down/DR 00:01:15 rt1-eth4[BDR]
7.7.7.7 1 00:00:35 Attempt/DR 00:01:15 rt1-eth5[BDR]
8.8.8.8 1 00:00:35 Init/DR 00:01:10 rt1-eth6[BDR]
9.9.9.9 1 00:00:35 Twoway/DR 00:01:14 rt1-eth7[BDR]
10.10.10.10 1 00:00:35 ExStart/DR 00:01:10 rt1-eth8[BDR]
ospf6d's output with this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID Pri DeadTime State/IfState Duration I/F[State]
2.2.2.2 1 00:00:36 ExChange/DR 00:00:44 rt1-eth0[BDR]
3.3.3.3 1 00:00:36 Loading/DR 00:00:39 rt1-eth1[BDR]
4.4.4.4 1 00:00:35 Full/DR 00:00:39 rt1-eth2[BDR]
5.5.5.5 1 00:00:36 None/DR 00:00:44 rt1-eth3[BDR]
6.6.6.6 1 00:00:36 Down/DR 00:00:39 rt1-eth4[BDR]
7.7.7.7 1 00:00:36 Attempt/DR 00:00:39 rt1-eth5[BDR]
8.8.8.8 1 00:00:36 Init/DR 00:00:39 rt1-eth6[BDR]
9.9.9.9 1 00:00:35 Twoway/DR 00:00:40 rt1-eth7[BDR]
10.10.10.10 1 00:00:36 ExStart/DR 00:00:39 rt1-eth8[BDR]
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
| |
These now generate warnings which will break the build with -Werror.
Note this may have enabled commands that should be disabled, or the
other way around...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
bgpd/bgp_route.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
isisd/isis_redist.c
isisd/isis_routemap.c
isisd/isis_vty.c
isisd/isisd.c
lib/command.c
lib/distribute.c
lib/if.c
lib/keychain.c
lib/routemap.c
lib/routemap.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospfd/ospf_routemap.c
ospfd/ospf_vty.c
ripd/rip_routemap.c
ripngd/ripng_routemap.c
vtysh/extract.pl.in
vtysh/vtysh.c
zebra/interface.c
zebra/irdp_interface.c
zebra/rt_netlink.c
zebra/rtadv.c
zebra/test_main.c
zebra/zebra_routemap.c
zebra/zebra_vty.c
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
| |
| |
| |
| | |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
| |
| |
| |
| | |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
| |
| |
| |
| | |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
| |
| |
| |
| | |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|/
|
|
| |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4010
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interfaces
Ticket: CM-7649
Reviewed By: Donald
Testing Done:
This is porting of the patch, ospf6d-bfd-fix-dereg-miss.patch from br2.5.
Issue: The IPv6 OSPF BFD sessions stay down after ifdown/ifup on logical interfaces. This problem doesn’t exist for BFD sessions created by BGP and IPv4 OSPF.
Root cause: When the interface is brought down the IPv6 neighbors discovered on that interface are deleted. This deletion happens without first bringing down the neighbor and the BFD deregistration happens only when the neighbor state changes. This leaves an orphaned BFD session in PTM. Also, the BFD session socket that is bound to the interface that was brought down loses connection. The socket has to be rebound to the interface when it comes up. This problem will not happen if the client deleted the sessions and re-adds it when interface goes down and come up. IPv4 OSPF and BGP work exactly like that.
Fix: Added the BFD deregistration code to IPv6 OSPF neighbor delete.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ticket:CM-6802, CM-6952
Reviewed By: Donald, Kanna
Testing Done:
Double commit of b76943235e09472ec174edcf7204fc82d27fe966 from br2.5. But, manually resolved all the compilation errors. Also, modified the shows to support the json format which was not supported in br2.5.
CM-6802 – Currently, BFD session status can be monitored only through ptmctl. There is no way to check the BFD status of a peer/neighbor through Quagga. Debugging becomes easier if BFD status is shown in Quagga too. BFD status is relevant when it is shown against the BGP peer/OSPF neighbor. For, this following code changes have been done:
- Only down messages from PTM were being propagated from Zebra daemon to clients (bgpd, ospfd and ospf6d). Now, both up and down messages are redistributed to the clients from zebra. BFD status field has been added to the messaging. Handling of BFD session up messages has been added to the client code. BGP/OSPF neighbor is brought down only if the old BFD session status is ‘Up’ to handle extra/initial down messages.
- BFD status and last update timestamp fields have been added to the common BFD info structure. Also, common show functions for showing BFD information have been added to BFD lib.
- Modified the BGP neighbor show functions to call common BFD lib functions.
- For ospf and ospf6, BFD information was maintained only at interface level. To show BFD status per neighbor, BFD information has been added at neighbor level too. “show ip ospf interface”, “show ip ospf neighbor detail”, “show ipv6 ospf6 interface” and “show ipv6 ospf6 neighbor detail” output have been modified to show BFD information.
CM-6952 - IBGP peers were always assumed to be multi-hop since there was no easy way to determine whether an IBGP peer was single hop or multihop unlike EBGP. But, this is causing problem with IBGP link local peers since BFD doesn't allow multihop BFD session with link local IP addresses. Link local peers were discovered when the interface peering was enabled. Interface peering is always singlehop. So, added checks to treat all interface based peers as single hop irrespective of whether the peer is IBGP or EBGP.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interactive mode of dynamically registering/deregistering neighbors discovered on BFD enabled interfaces with PTM/BFD through zebra. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered.
OSPF BFD command enhancement to configure BFD parameters (detect multiplier, min rx and min tx).
interface <if-name>
ip ospf bfd <detect mult> <min rx> <min tx>
This patch also adds BFD support for IPv6 OSPF. ospf6d will dynamically register/deregister IPv6 neighbors with BFD for monitoring the connectivity of the neighbor. Neighbor is registered with BFD when 2-way adjacency is established and deregistered when adjacency goes down if the BFD is enabled on the interface through which the neighbor was discovered.
OSPF6 BFD command added to configure BFD and parameters (detect multiplier, min rx and min tx).
interface <if-name>
ipv6 ospf6 bfd <detect mult> <min rx> <min tx>
Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Kanna Rajagopal <kanna@cumulusnetworks.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quagga sources have inherited a slew of Page Feed (^L, \xC) characters
from ancient history. Among other things, these break patchwork's
XML-RPC API because \xC is not a valid character in XML documents.
Nuke them from high orbit.
Patches can be adapted simply by:
sed -e 's%^L%%' -i filename.patch
(you can type page feeds in some environments with Ctrl-V Ctrl-L)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to OSPFv2, add support for 'log-adjacency-changes [detail]' to log
changes in adjacency state of ospfv3 neighbors.
Signed-off-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
Reviewed-by: Shrijeet Mukherjee <shm at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As per RFC 2328, section 10.3, if the neighbor state machine reaches
SeqNumberMismatch state when the NSM is in state Exchange or greater,
"router increments the DD sequence number in the neighbor data structure,
declares itself master (sets the master/slave bit to master), and starts
sending Database Description Packets, with the initialize (I), more (M)
and master (MS) bits set.".
The existing code doesn't increment the DD SeqNum. This patch fixes that.
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OSPFv3 code doesn't do the following things right as part of an adjacency
bringup:
- Transmit DbDesc frames appropriately to ensure faster state transition to
Loading state
- Transmit LsReq frames when switching to exchange state and on receipt of
an LS update in Loading state
- Requesting LSAs multiple times in LsReq.
It currently uses retransmit timer expiry to send the LsReq and DbDesc frames
which significantly slows down large lsdb syncs.
Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
|
|
| |
Only implement ospfv3NbrStateChange and ospfv3IfStateChange.
|
| |
|