Renato Westphal [Mon, 31 Dec 2018 13:11:15 +0000 (11:11 -0200)]
ospfd: convert a couple of "show" commands to DEFPY
DEFPY commands are easier to maintain and less susceptible to
bugs. In the long term we should try to merge the plethora of
"show ip ospf neighbor" commands (total of 14) into a single DEFPY.
Anton Degtyarev [Wed, 14 Nov 2018 03:14:04 +0000 (06:14 +0300)]
bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast
This commit is the last missing piece to complete BGP LU support in bgpd. To this moment, bgpd (and zebra) supported auto label assignment only for prefixes leaked from VRFs to vpn and for MPLS SR prefixes. This adds auto label assignment to other routes types in bgpd. The following enhancements have been made:
* bgp_route.c:bgp_process_main_one() now sets implicit-null local_label to all local, aggregate and redistributed routes.
* bgp_route.c:bgp_process_main_one() now will request a label from the label pool for any prefix that loses the label for some reason (for example, when the static label assignment config is removed)
* bgp_label.c:bgp_reg_dereg_for_label() now requests labels from label pool for routes which have no associated label index
* zebra_mpls.c:zebra_mpls_fec_register() now expects both label and label_index from the calling function, one of which must be set to MPLS_INVALID_LABEL or MPLS_INVALID_LABEL_INDEX, based on this it will decide how to register the provided FEC.
Signed-off-by: Anton Degtyarev <anton@cumulusnetworks.com>
Mark Stapp [Wed, 19 Dec 2018 16:51:41 +0000 (11:51 -0500)]
zebra: reduce rib workqueue retry timeout
Reduce the zebra rib workqueue retry timeout, used when the queue
towards the zebra dataplane has reached its limit. Lowering the
value was reported to improve update throughput on some platforms.
Donald Sharp [Wed, 19 Dec 2018 12:30:01 +0000 (07:30 -0500)]
bgpd: Allow shortened 'no set large-community' and 'no set large-comm-list'
These two commands previously required the whole original command but
we should allow the user to shorten out this since the data at the
end is not required to figure out what to delete.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 17 Dec 2018 02:36:49 +0000 (21:36 -0500)]
zebra: Allow ns delete to happen after under/over flow checks
Allow the ns deletion event to happen *after* the data validity
checks.
Please note this probably still leaves a weird hole if we receive
multiple namespace events ( as the for loop implies ). We will
stop handling anything after a namespace deletion notification.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd, yang: set default network-type to broadcast
isisd has both a circ_type and a circ_type_config variable to track
the network tpye of an interface. The former has no default, but the
latter defaults to broadcast. Adding that default makes sure that the
yang leaf won't be deleted, which is something that would not make
sense from an isisd perspective. We will need to add an operational
state leaf to match the potential difference between the configured
network type and the actual network type, since the latter might be
different based on the interface flags received from zebra.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
if we are using the transactional CLI, we might be trying to
delete an area that has not been actually created in isisd.
So rather than relying on isis_area_lookup, check the candidate
config for the presence of the corresponding area instance.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd: retrieve default values from the yang model
also fix a minor issue with isis_config_write where we were
not incrementing the write variable, which is used to append
a new line at the end of the vty string
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
As requested by the reviewers. Additionally, added a check when
setting a circuit on an interface to see if it is a loopback,
and in that case, set it to passive.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Note that we do not return the actual tlv_type and offset
of the erroneous TLV. This is because unpacking tlvs currently
uses a chain of function calls, where the notification can only
be sent at the start of the chain, but the tlv_type and offset
information are only available at the end. Unless we change the
code to propagate those values, we have no way to feed them to
the notification. So these leafs are not generated.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd: implement the authentication failure notifications
the original isisd code did not distinguish between
authentication_failure and authentication_type_failure, so
additional code had to be added to differentiate between the two
and to return the raw_pdu as requested by the IETF YANG model.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Note that the original IETF YANG model also included
a requirement to throttle such notifications so that they would
not be sent more often than once every 5 seconds. I did not
implement any throttling mechanism yet, mostly because I am
not sure whether this limit should apply to the entire isis daemon,
to each area, to each neighbor etc.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This is a simple command but with a complex callback, the only
one in isisd which uses the resource allocation API implemented
in the northbound (i.e. the PREPARE phase).
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd: retrofit 'router isis' and 'ip router isis' cmds
These are complex commands to retrofit, partly due to the number of
different callbacks they touch. Additionally, in FRR adding
an interface to an IS-IS area that does not exist also creates that
area. To make sure that this behavior is kept, while at the same
time keeping the northbound api consistent, we need to take extra
care to call the appropriate callbacks to update the YANG tree.
Note that many callbacks rely on the existence of the corresponding
IS-IS area; when these callbacks are joined together in a single
transaction, we need to ensure that the area creation is performed
first, or the config will fail. For this reason, the isis instance
create callback has been given a slightly lower priority than the
others.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>