Commit Graph

20095 Commits

Author SHA1 Message Date
Philippe Guibert
2224b36a30 bgpd: rpki show commande equipped with vrfname parameter
it is possible to dump rpki commands per vrf context.
also, rpki start/stop commands are also appended with vrfname parameter.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
c06cad2bd6 bgpd: use rtrlib callback for socket creation
this commit change introduces a callback function pointer that rtrlib
calls. this permits to create the socket and initialising the socket
with the right information, in the right vrf. Adding to this, rpki uses
a hook to be triggered when a vrf is enabled/disabled. in this way,
start mechanisms will be triggered only when vrf is available, and stop
mechanism will be  done upon vrf disable event.
Adding to this, the cache structure contains a back pointer to the rpki
vrf structure. this is done to retrieve the vrf where the cache points
to.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
044307285b bgpd: add a hook to inform a vrf is enabled/disabled
this hook can be used by plugins like rpki.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
157f6f4861 bgpd: ability to remove rpki contexts from vty
rpki context can be removed by doing 'no rpki' command from configure
node. this work allows to allocate the associated rpki_vrf context when
entering in rpki node, instead of at the initialisation step.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
dde9d0e43b lib, vtysh: bgp rpki constistent changes with rpki_node
rpki_node is a node under configure terminal. as such, align with other
nodes that are similar. Note that this change is important, since the
location where show running-config from vtysh displays rpki
configuration is changed in the middle of the configuration instead of
at the top, before authentication.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
38bf60cb23 bgpd: suppress availability from rpki command under enable node
this command may conflict with the same command available under vrf
subnode.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
743453433f bgpd: encapsulate rpki attributes in a context
this work is a preparatory work so that rpki can have per-vrf contexts.
the work consists in allocating a rpki_vrf structure with all inside:
rtr_config, cache, etc..
This work is also necessary in the long term support with yang
northboundapi. Indeed, there may be highly possible that yang context
for rpki be defined per core instance.
That work also instantiates a list of rpki_vrf, though only one instance
is created.
That work also introduces a vrfname field attribute that is set to null
for now , and stands for default vrf where rpki is configured on.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
fed3793b6a bgpd: link rpki debug with bgp debugging hook
rpki debugging is linked with standard bgp debugging facilities.
- debug rpki is dumped in running-config if the command is executed from
configure terminal.
- show debugging indicated whether rpki debug is enabled or not.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
aa31aef359 bgpd: add hooks for displaying debug information of a plugin
when a plugin is attached, some debugs may be attached to that plugin.
For that, add one hook that is interacting with vty: a boolean indicates
what the usage is for: either for impacting the 'show running-config',
or for impacting the 'show debugging' command.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
f3517f58f1 bgpd: running-config rpki indicates only non default values
the show running-config rpki was displaying systematically the default
values, when at least one cache server was configured. now, if the rpki
configuration has been changed, either because of a new cache server, or
because of a change in the default settings, then the associated
configuration is dumped in the 'show running-config' command.
adding to this, to permit user to dump the settings values, the command
'show rpki configuration' dumps the values whatever default or not.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
416d0484c0 bgpd: missing rpki expire-interval in show running-config
a missing command expire-interval was not present in show
running-config.
append it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
f9dea02e96 bgpd: missing rpki retry-interval in show running-config
show running-config did not display rpki retry-interval. fixes this.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
b5b9dcae9c bgpd: avoid crash when calling show rpki-table
if ssh cache servers are configured, then show rpki-table is looking at
the tcp server context. Fix this by checking the server cache type, and
also display the ssh context if this is configured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
bd32bb8058 bgpd: remove double spaces with rpki running config & ssh
remove double spaces when doing show running-config.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Philippe Guibert
7d177be5b0 bgpd: notify user that pub key file may be overriden
currently, private and public key files must differ with the suffix
keywork : '.pub'. If it is not the case, the pub key is ignored.
Inform user for that.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-07-02 08:17:51 +02:00
Donatas Abraitis
9558708a4e
Merge pull request #6661 from donaldsharp/flag_is_singular
bgpd: peer_af_flag_modify_vty assumes 1 flag at a time
2020-07-02 08:19:38 +03:00
Donald Sharp
b93caca965
Merge pull request #6665 from volta-networks/fix_isis_adj_log
isisd: log adj change when circuit goes down
2020-07-01 21:32:54 -04:00
Mark Stapp
d070e6429a
Merge pull request #6663 from wesleycoakley/qobj-unreg-fixup
pbrd, lib: remember to free alloc'd qobj elements on delete
2020-07-01 15:48:38 -04:00
Emanuele Di Pascale
7145d5bb3a isisd: log adj change when circuit goes down
if we shutdown an interface isisd will delete the adjacencies
on the corresponding circuit, but it will not log the change.
Fix it to make sure that each change is logged. Also specify
the level of the adjacency in the log message, while we are at it.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-07-01 21:48:38 +02:00
Donald Sharp
db45f64dd2 bgpd: peer_af_flag_modify_vty assumes 1 flag at a time
We have a bunch of code in bgp_vty.c that was passing
to peer_af_flag_modify_vty more than 1 flag at a time.
This was causing the underlying routines to get the
flags wrong.  In order to prevent this convert all the
places where we send multiple flags down to this function
to individual flag changes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-07-01 15:48:27 -04:00
Wesley Coakley
20953065ff pbrd, lib: remember to free alloc'd qobj on delete
Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2020-07-01 13:10:53 -04:00
Mark Stapp
8f36f59ad9
Merge pull request #6657 from donaldsharp/pbr_disable_on_4.9
tests: pbr is not working properly on arm 4.9 kernels
2020-07-01 07:45:17 -04:00
Donald Sharp
272ed0af32 tests: pbr is not working properly on arm 4.9 kernels
Just disable pbr tests on anything less than 4.10.

This has to do with the fact that the arm platform
is not allowing us to install a route into a
non default table using a interface associated
with a vrf.

ip route add default 4.5.6.7 via swp39 table 10000

When swp39 is in a vrf other than default

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-30 15:10:20 -04:00
Donatas Abraitis
87b42ba8c3
Merge pull request #6645 from pguibert6WIND/maxpathlunicast
bgpd: add maximum-paths vty command to ipv6 lu node
2020-06-29 14:06:56 +03:00
Philippe Guibert
39edabac97 bgpd: add maximum-paths vty command to ipv4 lu node
add maximum-paths vty command to ipv4 lu node.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2020-06-27 22:53:04 +02:00
Donatas Abraitis
f48e3fa9e5
Merge pull request #6643 from mjstapp/fix_typos_bgp_multivrf1
test: fix some typos in bgp_multi_vrf_topo1
2020-06-27 18:41:20 +03:00
Renato Westphal
28aac9c2a8
Merge pull request #6635 from Niral-Networks/niral_dev_vrf_isis
ISIS VRF: Added vrf_socket and new param in isisd privileges.
2020-06-26 22:23:40 -03:00
Donatas Abraitis
09ec00f95b
Merge pull request #6639 from qlyoung/fix-alpine-pkg-arch
alpine: enable multi-arch builds
2020-06-26 19:14:49 +03:00
Mark Stapp
7adbc3cca5
Merge pull request #6644 from donaldsharp/more_pbr_debugs_for_arm
tests: Add some more data gathering
2020-06-26 12:04:26 -04:00
Donatas Abraitis
d5ab751395
Merge pull request #6640 from qlyoung/doc-docker-builds
doc: add docker image build instructions
2020-06-26 18:18:43 +03:00
Donald Sharp
2cb8bfb247 tests: Add some more data gathering
From last addition we can tell that the nexthop-group C is
installed but pbr does not think it is.  This failure
has been consistent the last 4-5 runs in master.  Lets
add a bit more data gathering to figure out what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-26 07:10:08 -04:00
Mark Stapp
8171368be7 test: fix some typos in bgp_multi_vrf_topo1
Noticed a few text things in this topotest.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-25 13:43:37 -04:00
Donald Sharp
44cef72912
Merge pull request #6611 from mjstapp/fix_rib_comparisons
zebra: improve route_entry comparison logic
2020-06-25 12:33:25 -04:00
Donatas Abraitis
f573ae4ced
Merge pull request #6642 from donaldsharp/forgotten_daemons
Forgotten daemons
2020-06-25 18:48:11 +03:00
Donald Sharp
0ce2d6ba13
Merge pull request #6630 from opensourcerouting/bgp-node-dest-rename
bgp: rename bgp_node to bgp_dest
2020-06-25 09:14:18 -04:00
Donald Sharp
b6eaf9065b
Merge pull request #6619 from Niral-Networks/niral_isis_debug_p2
ISIS VRF: ISIS Debug structure modifications Type 2
2020-06-25 09:07:42 -04:00
Mark Stapp
95832d33ba
Merge pull request #6641 from donaldsharp/bgp_sighup_is_bad
bgpd: Have bgp ignore SIGHUP at the moment
2020-06-25 08:28:57 -04:00
Mark Stapp
9db35a5e6f zebra: improve route_entry comparison logic
Improve and centralize some logic used to a) compare two
route_entries, and b) to locate a route_entry that matches
a dplane context object that contains the results of a
fib update. We were not rigorous enough in checking routes'
properties, especially when examining connected routes where
we allow multiple route_entries.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-25 08:21:27 -04:00
Donald Sharp
24265ba75c
Merge pull request #6636 from mjstapp/fix_topojson_intf_names
tests: in topojson framework, include vrf with interface name
2020-06-25 08:19:59 -04:00
Donald Sharp
f57a88f37c debian: Add missing daemons to logrotation knowledge
Update missing daemons to rotate as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-25 07:13:50 -04:00
Donald Sharp
1f4add997d redhat: Update logrotate to have knowledge of all daemons
Upon visual inspection the redhat logrotate file was incomplete
Make it complete.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-25 07:12:59 -04:00
Donald Sharp
23ca3269da bgpd: Have bgp ignore SIGHUP at the moment
SIGHUP is ostensibly supposed to reload configuration
from a fresh slate.  This is currently horribly broken
so much so that bgp just crashes.  I see no point
in trying to make this work considering the yang
work coming down the pike.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-24 20:15:12 -04:00
Quentin Young
cbd730b98a doc: add docker image build instructions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-24 19:14:19 -04:00
Quentin Young
2f2d32a841 alpine: enable multi-arch builds
Now that amd64 dependencies have been removed we can use the correct
architecture specifier for Alpine packaging metadata in order to build
packages for all supported platforms.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-06-24 16:33:18 -04:00
Mark Stapp
af1b1edad4
Merge pull request #6637 from donaldsharp/frr_reload_ipv6
tools: Fix reload with 'ipv6 address...' in interface
2020-06-24 16:30:27 -04:00
Donald Sharp
e238920df0 tools: Fix reload with 'ipv6 address...' in interface
When you have this configuration:

int foo
  ipv6 address fd01:0:0:1::1/64

And issue a reload statement, FRR-reload
is reducing the code to a
`no ipv6 address fd01:0:0:1::/64`
and then issuing a:
`ipv6 address fd01:0:0:1::/64`

The end result is of course that the foo
interface now has two v6 addresses on it.

The brilliance of this is of course if you
happen to have two systems that are connected
over an interface, and you issue a reload command.
They both get fd01:0:0:1::/64 as an ipv6 address
and DAD detection kicks in and stomps on your stuff.

Put a special hey don't munch the v6 address line
in a reload situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-06-24 14:30:49 -04:00
Mark Stapp
c4f9205763 tests: fix interface and debug config diff in topojson framework
Include vrf name with interface name when topojson framework
generates interface configuration. This matches the output of
'show runn', and makes config reset less disruptive. Also
stop removing configured debugs and log output when re-generating
config.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-06-24 11:27:15 -04:00
Kaushik
caa18d497f ISIS VRF: Added vrf_socket and new param in isisd privileges.
1. The socket() call replaced with vrf_socket() in open_packet_socket().
2. One new isisd privileges is added in zebra_capabilities_t [].

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-06-24 05:27:14 -07:00
Mark Stapp
8576ceef01
Merge pull request #6632 from donaldsharp/pbr_data_gathering
tests: the pbr topo1 test is failing gather data to help debug
2020-06-24 07:43:07 -04:00
harios
e740f9c159 ISIS VRF: ISIS Debug structure modifications
1. The "isis->debug" variable dependency on debug logs print is removed.

Signed-off-by: harios <hari@niralnetworks.com>
2020-06-24 14:45:06 +05:30