| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use this noop decoder for const values (since we can't mutate a const
value passed into frrscript_call anyways) or values we don't want to
write a decoder for.
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is an example of creating encoders and decoders for user defined
structs and registering them in the ENCODE_ARGS DECODE_ARGS macro
in frrscript.
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| |
| |
| | |
Can now test out script by modifying a prefix
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split existing lua_to* functions into two functions:
- lua_decode_*: unmarshall Lua values into an existing C data structure
- lua_to*: allocate *and* unmarshall Lua values into C data structure
This allows us to mutate C data structures passed into frrscript_call,
without allocation
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donald Lee <dlqs@gmx.com>
|
| |
| |
| |
| | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Just drop IPV4_MAX_PREFIXLEN at all, no need keeping both.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Just drop IPV6_MAX_PREFIXLEN at all, no need keeping both.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|\ \
| | |
| | | |
zebra: fix a couple of coverity warnings
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are a few places in the code where we use PREFIX_COPY(_IPV4/IPV6)
macro to copy a prefix. Let's always use prefix_copy function for this.
This should fix CID 1482142 and 1504610.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| |/ /
|/| | |
isisd, ospfd: update interface_link_params callback to check for change
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adding defensive code to the interface_link_params zebra callback
to check if the link params changed before taking action.
Signed-off-by: Karen Schoener <karen@voltanet.io>
|
|\ \ \
| | | |
| | | | |
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>
|
|\ \ \
| |/ /
|/| | |
lib: Add some hash name differentiation for Command Hash's
|
| | |
| | |
| | |
| | | |
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...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>
|
|\ \
| | |
| | | |
lib: preparations for RFC5424 syslog support
|
| | |
| | |
| | |
| | |
| | |
| | | |
*sigh*. It doesn't accept `%m` otherwise.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Might've made a few things too many `static` there.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | | |
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
glibc removed its pid cache a while back, and grabbing this from TLS is
faster than repeatedly calling the kernel...
Also use `intmax_t` which is more appropriate for both PID & TID.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the file targets append one anyway, save them some extra work.
syslog can use `%.*s` since it's "forced" printf by API anyway.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is old-style syslog, used among other things for /dev/log.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | | |
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
printfrr() recently acquired the capability to record start/end of
formatting outputs. Make use of this in the zlog code so logging
targets have access to this information.
(This also records how long the `[XXXXX-XXXXX][EC 9999999]` prefix was
so log targets can choose to skip over it.)
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | | |
... so additional targets can print their state.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`log-filter WORD` was giving me a serious headache since it also matches
`log WORD` due to the way the CLI token handling works. This meant that
a mistyped `log something` command would silently be interpreted as a
filter string, causing me serious headscratching and WTFs until I
figured what was going on.
Remove this UX pitfall so noone else falls into it. (Since the command
was never saved to config, renaming it shouldn't cause trouble.)
[Also I apparently forgot to update the docs when I transferred this
over to the new zlog bits...]
TODO for a rainy day: since we collect all the CLI commands anyway, we
should warn somewhere for "2nd level ambiguous" commands like this.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|\ \ \
| | | |
| | | | |
EVPN route type-5 gateway IP overlay Index
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Add following set clause for route-maps
"set evpn gateway-ip <ipv4|ipv6 >A.B.C.D|X:X::X:X"
- When this route-map is applied as outboubd policy in BGP, it will set the
gateway-ip in BGP attribute For EVPN type-5 routes.
Example configuration:
route-map RMAP-EVPN_GWIP permit 5
set evpn gateway-ip ipv4 50.0.2.12
set evpn gateway-ip ipv6 50:0:2::12
router bgp 101
bgp router-id 10.100.0.1
neighbor 10.0.1.2 remote-as 102
!
address-family l2vpn evpn
neighbor 10.0.1.2 activate
neighbor 10.0.1.2 route-map RMAP-EVPN_GWIP out
advertise-all-vni
exit-address-family
Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If we have the following configuration:
```
vrf red
smth
exit-vrf
!
interface red vrf red
smth
```
And we delete the VRF using "no vrf red" command, we end up with:
```
interface red
smth
```
Interface config is preserved but moved to the default VRF.
This is not an expected behavior. We should remove the interface config
when the VRF is deleted.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| | | |
| | | | |
lib: add an MTYPE for bitfields
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
it is handy to be able to see allocated bitfields in the show
memory output.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
|
|\ \ \ \
| | | | |
| | | | | |
lib: fix interface configuration after vrf change
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit fixes the following problem:
- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface
It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.
For example:
```
nfware# conf
nfware(config)# interface enp2s0
<-- move the enp2s0 to a different VRF -->
nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```
To fix the issue, go through all connected vty shells and update the
stored XPath.
Suggested-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \ \
| |_|_|/
|/| | | |
lib: remove pure attribute from functions that modify memory
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Almost all functions currently marked with pure attribute acquire a
route_node lock. By marking them pure we allow compiler to optimize the
code and not call them when it already knows the return value. This is
completely incorrect.
Only two of eleven functions can be marked as pure. And they still won't
be optimized because they are never called from the same function twice.
Let's remove the ext_pure macro completely to reduce the chance of
repeating this mistake in the future.
Fixes #8866, #8809, #8595, #6992.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|\ \ \
| | | |
| | | | |
lib: stop grpc pthread at shutdown
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
At shutdown, try to stop the grpc module and its
dedicated pthread cleanly.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
|