Commit Graph

24680 Commits

Author SHA1 Message Date
Donatas Abraitis
e702605d80 *: Do not check for XMALLOC/XCALLOC against NULLs
We don't check this pattern anywhere in the code basically, so let's
unify the code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 22:27:50 +03:00
Donatas Abraitis
63f7a3b910 tools: Add coccinelle script for checking against XMALLOC/XCALLOC NULLs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 22:27:50 +03:00
Donatas Abraitis
4953391b45 bgpd: Avoid more assignments within checks (round 2)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 22:27:50 +03:00
Donatas Abraitis
d4980edf47 bgpd: No need casting to boolean for boolean
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 22:27:50 +03:00
Donatas Abraitis
0e2d70760d lib: Avoid using assignments within checks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 22:27:49 +03:00
Donatas Abraitis
11dbcdd35c bgpd: Avoid using assignments within checks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-06-29 14:40:14 +03:00
Rafael Zalamena
176d039a27
Merge pull request #8937 from idryzhov/index-once-again
doc: remove unnecessary index directives
2021-06-29 07:27:29 -03:00
Igor Ryzhov
5c54512ecc doc: remove "no" from clicmd directives
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-29 12:50:10 +03:00
Igor Ryzhov
ba88ced84c
Merge pull request #8835 from ranjanyash54/clear_process
ospf6d: "clear ipv6 ospf6 process" command
2021-06-29 11:54:39 +03:00
Donatas Abraitis
7702d0b720
Merge pull request #8911 from donaldsharp/command_node
lib: Add some hash name differentiation for Command Hash's
2021-06-29 11:47:16 +03:00
Quentin Young
3f8711681e
Merge pull request #8850 from opensourcerouting/ospf6-checksum-json
ospf6d: consistent checksum JSON output
2021-06-29 02:23:06 +00:00
Igor Ryzhov
c9ba467f68 doc: remove unnecessary index directives
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-28 17:49:14 +03:00
Mark Stapp
0e5572bc63
Merge pull request #8932 from anlancs/fix-some-doc-warnings
doc: fix some compile warning
2021-06-28 10:30:34 -04:00
Donald Sharp
d57b090fcb
Merge pull request #8925 from idryzhov/ospf6-duplicated-read
ospf6d: fix duplicated packet read
2021-06-28 07:44:33 -04:00
Donald Sharp
3d16b5c146
Merge pull request #8931 from anlancs/master-fix-doc-ospf-instances
doc: add a note for ospfd instances
2021-06-28 07:37:28 -04:00
anlancs
7aa6fb2d6a doc: fix some compile warning
domainname is a merge conflict: it is duplicated, so delete it.
bgp content is a compille warning and wrongly display, so fix it.

Signed-off-by: anlancs <anlan_cs@tom.com>
2021-06-28 14:36:45 +08:00
Yash Ranjan
f71ed6df3e ospf6d: "clear ipv6 ospf6 process" command
Adding the "clear ipv6 ospf6 command" . It resets
the ospfv3 datastructures and clears the database
as well as route tables. It resets the neighborship
by restarting the interface state machine.
If the user wants to change the router-id, this
command updates the router-id to the latest static
router-id and starts the neighbor formation with
the new router-id.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2021-06-27 20:56:10 -07:00
anlancs
5ebb223905 doc: add a note for ospfd instances
Multiple instances of ospfd don't support vrf henceforth.

Signed-off-by: anlancs <anlan_cs@tom.com>
2021-06-28 09:32:38 +08:00
Igor Ryzhov
709bd20421 ospf6d: fix duplicated packet read
When OSPFv3 router is configured in both default and non-default VRFs,
every packet destined to a non-default VRF is read twice. This makes it
impossible to establish neighborship because every DbDesc packet is
treated as duplicated and we end up infinitely exchanging DbDescs.

We should drop packets received in the default VRF if an interface we
received it on is bound to another VRF.

Same thing was done for OSPFv2 in 555691e.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-26 12:57:26 +03:00
Donald Sharp
32694c41bb
Merge pull request #8909 from idryzhov/isis-conf
isisd: fix extra space in the mpls-te config output
2021-06-25 19:34:41 -04:00
Donald Sharp
329f4cd3ed
Merge pull request #8926 from opensourcerouting/ospfv3-nssa-typo
doc: fix typo in OSPFv3 NSSA
2021-06-25 19:33:58 -04:00
Donald Sharp
ad1ea39d60
Merge pull request #8924 from volta-networks/fix_pcinit_coverity
pathd: coverity msg , frr_weak_random instead rand.
2021-06-25 19:15:30 -04:00
Donald Sharp
31cd08c94e
Merge pull request #8920 from mjstapp/fix_bgp_adv_sa
bgpd: Fix SA warning about freeing an aspath
2021-06-25 19:13:25 -04:00
Rafael Zalamena
84f38d8caf doc: fix typo in OSPFv3 NSSA
Also change the command font to highlight it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 16:10:33 -03:00
Christian Hopps
065549df13
Merge pull request #8907 from idryzhov/isis-batching
Fix ISIS config batching
2021-06-25 10:32:28 -04:00
Donald Sharp
49b549d50a
Merge pull request #8463 from opensourcerouting/build-assorted-20210413
build system housekeeping
2021-06-25 10:32:05 -04:00
Donald Sharp
b4835c13b0
Merge pull request #8923 from kuldeepkash/bgp_convergence_test
tests: Fix generate support bundle issue for test_route_map_topo1
2021-06-25 08:18:32 -04:00
Javier Garcia
2568524825 pathd: coverity msg , frr_weak_random instead rand.
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-06-25 11:52:02 +02:00
Kuldeep Kashyap
25b43d5654 tests: Fix generate support bundle issue for test_route_map_topo1
1. There was a false condition, which was causing support bundle to be generated.
Issue is fixed.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2021-06-24 15:26:59 -07:00
Russ White
e88ed0d667
Merge pull request #8912 from gpnaveen/ospf_asbr_summary
tests: Adding ospfv2 summarisation test cases.
2021-06-24 16:19:22 -04:00
Stephen Worley
a7c91c4246
Merge pull request #8731 from mjstapp/fix_pw_backups
zebra: Fix pseudowires with backup nexthops
2021-06-24 12:46:31 -04:00
Donald Sharp
c81d78cf1c lib: Add some hash name differentiation for Command Hash's
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-06-24 10:51:34 -04:00
David Lamparter
5c076fe7e7 doc: mark deprecated ./configure options
These aren't compile-time settings anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-06-24 16:42:59 +02:00
David Lamparter
9b802bf44f doc: explain the new service cputime... commands
These are user tunable, even though most users hopefully don't need to
touch them.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
13f9aea383 build: add -Werror to xrelfo log format warnings
Adding a `\n' should now produce a warning.  Controlled by `-Werror` so
if you're doing a dev build and it's warning about some `prefix2str`
that should be converted to `%pFX`, you can turn off `-Werror` to fix it
later like with all other warnings.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
6418e2d342 lib: try CLOCK_THREAD_CPUTIME_ID
This might be faster if at some point in the future the Linux vDSO
supports CLOCK_THREAD_CPUTIME_ID without making a syscall.  (Same
applies for other OSes.)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
45f0118832 lib: make cputime checks runtime options (v2)
...really no reason to force this into a compile time decision.  The
only point is avoiding the getrusage() syscall, which can easily be a
runtime decision.

[v2: also split cputime & walltime limits]

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:59 +02:00
David Lamparter
94a64dab86 build: remove unused --disable-rusage
This option does literally nothing.  Not sure since when, but the value
is not used anywhere at all.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:58 +02:00
David Lamparter
2ee5fdba02 build: remove --enable-exampledir
This is no longer used with the recent config example removal.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-06-24 16:42:58 +02:00
Mark Stapp
7bee25fa20
Merge pull request #8337 from donaldsharp/reload_with_routemaps
Reload with routemaps
2021-06-24 08:19:29 -04:00
Mark Stapp
e9b3e38f2d bgpd: Fix SA warning about freeing an aspath
Fix coverity warning CID 1505589

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-06-24 07:50:23 -04:00
Igor Ryzhov
3d9dffbe7e
Merge pull request #8800 from donaldsharp/sr_vtysh_fix
vtysh: Expose SR node for non pathd use cases
2021-06-24 00:07:45 +03:00
nguggarigoud
e6a472a05a tests: Adding ospfv2 summarisation test cases.
Total cases 6.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2021-06-23 13:57:12 -07:00
Igor Ryzhov
1c06b80f04
Merge pull request #8904 from rameshabhinay/ospf6_show
ospf6d: Show neighbor displays twice for every neighbor.
2021-06-23 18:35:13 +03:00
Donald Sharp
6293c2181a tools: limit bgp route-maps to direct changes only
When using frr-reload.py to modify a bgp neighbors route-map
the code was doing this:

a) deleting the previous route-map: `no neighbor XX route-map YY (in|out)`
b) Adding the new route-map back in `neighbor XX route-may ZZ (in|out)`

Now imagine that we have an outgoing route-map that we are changing
and the reload is large because of a large number of lines in frr.conf

Item (a) will happen.  BGP will immediately start sending all local
routes.  At some point in time in the future (b) will be applied.
This of course causes a withdraw but for a short amount of time we
are leaking unintended routes.  This is bad for several reasons
not 1) route churn upstream, 2) we might influence traffic to go the
wrong way. 3) if upstream has a maximum-prefix command the routes
being sent might trip its circuitry and shutdown the peer entirely
not even allowing you to get to (b).

Ticket: #2589685
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-06-23 10:19:00 -04:00
Donald Sharp
43d985e414
Merge pull request #8860 from ton31337/fix/aspath_prepend_default-originate
bgpd: Allow aspath prepending for default-originate with route-maps
2021-06-23 10:13:29 -04:00
Olivier Dugeon
037bd92922
Merge pull request #8842 from volta-networks/feat_pc_initiated
pathd: Feat pc initiated
2021-06-23 15:14:01 +02:00
Igor Ryzhov
e432649280 isisd: fix interface ldp-sync configuration
There are two checks done when configuring ldp-sync on an interface:
- interface is not a loopback
- interface is in the default VRF
Both checks are incorrectly done using the operational data.

The second check can be done using only config data - do that.

The first check can't be done using only configurational data, but it's
not necessary. LDP sync code doesn't operate on loopback interfaces
already. There's no harm in allowing this to be configured.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-23 15:52:37 +03:00
Igor Ryzhov
80ab95b134 isisd: fix instance ldp-sync configuration
Don't rely on operational data to validate that configuration is applied
to the default VRF. The VRF name is stored in the config - use it instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-23 15:52:37 +03:00
Igor Ryzhov
0a156eecf2 isisd: fix NET NB configuration
Don't rely on operational data to check for system ID consistency. This
is purely configurational data thing.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-23 15:52:37 +03:00