]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agolib: Note old ifindex on shutdown
Donald Sharp [Thu, 20 Aug 2020 18:42:56 +0000 (14:42 -0400)]
lib: Note old ifindex on shutdown

If we have an interface configured in a daemon on shutdown
store the old ifindex value for retrieval on when it is
possibly recreated.

This is especially important for nexthop groups as that we
had at one point in time the ability to restore the
configuration but it was lost when we started deleting
all deleted interfaces.  We need the nexthop group subsystem
to also mark that it has configured an interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agopbrd: Allow interfaces to be deleted then added back in
Donald Sharp [Thu, 20 Aug 2020 16:55:45 +0000 (12:55 -0400)]
pbrd: Allow interfaces to be deleted then added back in

PBR needs the ability to allow ephermeal interfaces( bonds,
vrfs, dummy, bridges, etc ) to be destroyed and then
recreated and at the same time keep track of them and
rebuild state as appropriate when we get a change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agolib: Allow nexthop simple display to take an alternate ifp name
Donald Sharp [Thu, 20 Aug 2020 15:56:05 +0000 (11:56 -0400)]
lib: Allow nexthop simple display to take an alternate ifp name

The nexthop_group_write_nexthop_simple function outputs the
interface name, because we've stored the ifindex.  The problem
is that there are ephermeal interfaces in linux that can be
destroyed/recreated.  Allow us to keep that data and do something
a bit smarter to allow show run's and other show commands to continue
to work when the interface is deleted.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agopbrd: Properly hook back up when vrf is destroyed than recreated
Donald Sharp [Thu, 20 Aug 2020 14:34:38 +0000 (10:34 -0400)]
pbrd: Properly hook back up when vrf is destroyed than recreated

Currently when a vrf is deleted than added back in PBR was
not going through and touching up all the data structures
that needed to be massaged to allow it to start working again.

This includes:

a) Search through the nexthop groups to find any nexthop
that references the old nexthop id and set it right again.

b) Search through the nexthop cache for nht and reset
those nexthops to the right vrf as well as re-register

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agolib: break up show nexthop API a bit for reuse
Stephen Worley [Tue, 18 Aug 2020 20:53:44 +0000 (16:53 -0400)]
lib: break up show nexthop API a bit for reuse

Not everything cares about the vrf and backup info. Break
up the API to add a simple version to just write gateway/interface
info.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
3 years agoMerge pull request #7008 from donaldsharp/zebra_lies
Mark Stapp [Thu, 27 Aug 2020 11:58:37 +0000 (07:58 -0400)]
Merge pull request #7008 from donaldsharp/zebra_lies

Zebra lies

3 years agoMerge pull request #6999 from opensourcerouting/isisd-modular-spf
Donald Sharp [Thu, 27 Aug 2020 11:24:18 +0000 (07:24 -0400)]
Merge pull request #6999 from opensourcerouting/isisd-modular-spf

isisd: make the SPF code more modular + reverse SPF + unit tests

3 years agoMerge pull request #7002 from mjstapp/fix_doc_sphinx_api
Donald Sharp [Thu, 27 Aug 2020 11:17:17 +0000 (07:17 -0400)]
Merge pull request #7002 from mjstapp/fix_doc_sphinx_api

doc: test sphinx version, use correct apis

3 years agoMerge pull request #7005 from Orange-OpenSource/dev_ospf_sr
Donald Sharp [Thu, 27 Aug 2020 11:15:38 +0000 (07:15 -0400)]
Merge pull request #7005 from Orange-OpenSource/dev_ospf_sr

ospfd: Coverity corrections

3 years agoMerge pull request #6979 from Jafaral/pim-dup
Donald Sharp [Thu, 27 Aug 2020 11:09:36 +0000 (07:09 -0400)]
Merge pull request #6979 from Jafaral/pim-dup

pimd: fix igmp querier election and IP address mapping

3 years agoMerge pull request #6996 from ne-vlezay80/patch-6
Donatas Abraitis [Thu, 27 Aug 2020 07:06:15 +0000 (10:06 +0300)]
Merge pull request #6996 from ne-vlezay80/patch-6

github: Add lost chapter witch issue template

3 years agozebra: When we fail, actually note the failure
Donald Sharp [Thu, 27 Aug 2020 01:38:47 +0000 (21:38 -0400)]
zebra: When we fail, actually note the failure

During testing it was noticed that routes were considered
installed by zebra, but the kernel did not have the route.
Upon close debugging of the rib it was noticed that FRR
was turning a dplane_ctx_route_init into a success and
FRR was now in a bad state.

2020/08/26 17:55:53.897436 PBR: route_notify_owner: [0.0.0.0/0] Route Removed succeeded for table: 10012
2020/08/26 17:55:53.897572 ZEBRA: 0.0.0.0/0: uptime == 432033, type == 24, instance == 0, table == 10012
2020/08/26 17:55:53.897622 ZEBRA: rib_meta_queue_add: (0:10012):0.0.0.0/0: queued rn 0x5566b0ea7680 into sub-queue 5
2020/08/26 17:55:53.907637 ZEBRA: default(0:10012):0.0.0.0/0: Processing rn 0x5566b0ea7680
2020/08/26 17:55:53.907665 ZEBRA: default(0:10012):0.0.0.0/0: Examine re 0x5566b0d01200 (pbr) status 2 flags 1 dist 200 metric 0
2020/08/26 17:55:53.907702 ZEBRA: default(0:10012):0.0.0.0/0: After processing: old_selected 0x0 new_selected 0x5566b0d01200 old_fib 0x0 new_fib 0x5566b0d01200
2020/08/26 17:55:53.907713 ZEBRA: default(0:10012):0.0.0.0/0: Adding route rn 0x5566b0ea7680, re 0x5566b0d01200 (pbr)
2020/08/26 17:55:53.907879 ZEBRA: default(0:10012):0.0.0.0/0: rn 0x5566b0ea7680 dequeued from sub-queue 5
2020/08/26 17:55:53.907943 ZEBRA: netlink_route_multipath: RTM_NEWROUTE 0.0.0.0/0 vrf 0(10012)
2020/08/26 17:55:53.910756 ZEBRA: default(0:10012):0.0.0.0/0 Processing dplane result ctx 0x5566b0ea82f0, op ROUTE_INSTALL result SUCCESS
2020/08/26 17:55:53.910769 ZEBRA: update_from_ctx: default(0:10012):0.0.0.0/0: SELECTED, re 0x5566b0d01200
2020/08/26 17:55:53.910785 ZEBRA: default(0:10012):0.0.0.0/0 update_from_ctx(): no fib nhg
2020/08/26 17:55:53.910793 ZEBRA: default(0:10012):0.0.0.0/0 update_from_ctx(): rib nhg matched, changed 'true'
2020/08/26 17:55:53.910802 ZEBRA: (0:10012):0.0.0.0/0: Redist update re 0x5566b0d01200 (pbr), old 0x0 (None)
2020/08/26 17:55:53.910812 ZEBRA: Notifying Owner: 24 about prefix 0.0.0.0/0(10012) 2 vrf: 0
2020/08/26 17:55:53.910912 PBR: route_notify_owner: [0.0.0.0/0] Route installed succeeded for table: 10012
2020/08/26 17:55:55.400516 ZEBRA: RTM_DELROUTE 0.0.0.0/0 vrf default(0) table_id: 10012 metric: 20 Admin Distance: 0
2020/08/26 17:55:55.400527 ZEBRA: rib_delete: (0:10012):0.0.0.0/0: rn 0x5566b0ea7680, re 0x5566b0d01200 (pbr) was deleted from kernel, adding

We were receiving a notification from the kernel that the route was deleted and deciding
that we needed to reinstall it.  At that point in time when it got into the dplane
handlers to convert it to the dplane pthread, the dplane decided to drop the request
convert it too a success and not do anything.

This code change removes the conversion from this failure to success and
notifies the upper level about it.  After this change the default route
to table 10012 is now properly marked as rejected:

root@mlx-2700-07:mgmt:/var/log/frr# vtysh -c "show ip route table 10012"
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

VRF default table 10012:
F>r 0.0.0.0/0 [200/0] via 172.168.1.164, isp2-uplink (vrf PUBLIC), weight 1, 00:24:48

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agozebra: Short circuit test for nexthop groups when not using
Donald Sharp [Thu, 27 Aug 2020 01:34:22 +0000 (21:34 -0400)]
zebra: Short circuit test for nexthop groups when not using

When we are not using nexthop groups, there is no need to
test for whether or not they are installed correctly or not

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agoisisd: add abiliy to compute the reverse shortest path tree
Renato Westphal [Mon, 24 Aug 2020 18:27:15 +0000 (15:27 -0300)]
isisd: add abiliy to compute the reverse shortest path tree

RFC 7490 says:
 "The reverse SPF computes the cost from each remote node to root. This
  is achieved by running the normal SPF algorithm but using the link
  cost in the direction from the next hop back towards root in place of
  the link cost in the direction away from root towards the next hop".

Support for reverse SPF will be necessary later as it's one of the
algorithms used to compute R-LFA/TI-LFA repair paths.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests, isisd: add IS-IS SPF unit tests
Renato Westphal [Mon, 24 Aug 2020 17:46:36 +0000 (14:46 -0300)]
tests, isisd: add IS-IS SPF unit tests

Now that the IS-IS SPF code is more modular, write some unit tests
for it.

This commit includes a new test program called "test_isis_spf" which
can load any test topology (there are 13 different ones available)
and run SPF on any desired node. In the future this same test program
and topologies will also be used to test reverse SPF and TI-LFA.

The "test_common.c" file contains helper functions used to parse the
topology descriptions from "test_topologies.c" into LSP databases
that can be used as an input to the SPF code.

This commit also introduces the F_ISIS_UNIT_TEST flag which is used
to prevent the IS-IS code from scheduling any event when running
under the context of an unit test.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: make the SPF code more modular
Renato Westphal [Sun, 23 Aug 2020 03:22:32 +0000 (00:22 -0300)]
isisd: make the SPF code more modular

The goal of modularizing the SPF code is to make it possible for
isisd to run SPF in the behalf of other nodes in the network, which
is going to be necessary later when implementing the R-LFA/TI-LFA
solutions. On top of that, a modularized SPF opens the door for
much needed unit testing.

Summary of the changes:
* Change the isis_spf_preload_tent() function to use the local LSP
  as an input (as per the ISO specification) instead of populating
  the TENT based on the list of local interfaces;
* Introduce the "isis_spf_adj" structure to represent an SPF
  adjacency.  SPF adjacencies are inferred from the LSPDB, different
  from normal adjacencies formed using IIH messages;
* Introduce the F_SPFTREE_NO_ROUTES flag to control whether the
  SPT should create routes or not;
* Introduce the F_SPFTREE_NO_ADJACENCIES flag to specify whether
  IS-IS adjacency information is available or not. When running SPF
  in the behalf of other nodes, or under the context of an unit test,
  no adjacency information will be present.
* On isis_area_create(), move some code around so that the area's isis
  backpointer is set as early as possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: introduce command to display IS-IS routes
Renato Westphal [Sun, 23 Aug 2020 02:24:06 +0000 (23:24 -0300)]
isisd: introduce command to display IS-IS routes

Introduce the "show isis route" command to display the routes
associated to an SPF tree. Different from the "show ip route" command,
"show isis route" displays the L1 and L2 routes separately (and not
the best routes only).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: minor cleanup
Renato Westphal [Fri, 21 Aug 2020 00:44:27 +0000 (21:44 -0300)]
isisd: minor cleanup

* Bring back some consts that were removed;
* Replace ALL_LIST_ELEMENTS by ALL_LIST_ELEMENTS_RO whenever
  possible;
* Fix some CLI return values;
* Remove some unnecessary initializations.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: reuse adjacency state change hook in the SPF code
Renato Westphal [Fri, 21 Aug 2020 00:36:59 +0000 (21:36 -0300)]
isisd: reuse adjacency state change hook in the SPF code

This is mostly a cosmetic change to make the code more modular,
more elegant and easier to understand.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: introduce two LSP iteration functions
Renato Westphal [Fri, 21 Aug 2020 00:27:56 +0000 (21:27 -0300)]
isisd: introduce two LSP iteration functions

Iterating over all IP or IS reachability information from a given
LSP isn't a trivial task. That information is scattered throughout
different TLV types, and which ones need to be used depend on
multiple variables (e.g. the SPF tree address family, MT-ID,
etc). This not to mention that an LSP might consist of multiple
fragments.

Introduce the following two LSP iteration function to facilitate
obtaining IP/IS reachability information from a given LSP:
* isis_lsp_iterate_ip_reach()
* isis_lsp_iterate_is_reach()

These functions will be used extensively by the upcoming TI-LFA
code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agodoc: test sphinx version, use correct apis
Mark Stapp [Wed, 26 Aug 2020 14:45:21 +0000 (10:45 -0400)]
doc: test sphinx version, use correct apis

Some Sphinx apis have changed over time; test the installed
version and use the apis that match the version.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agopimd: fix IGMP querier election
Nathan Bahr [Mon, 24 Aug 2020 18:52:51 +0000 (13:52 -0500)]
pimd: fix IGMP querier election

Match by exact address rather than by prefix match to
determine if we generated the IGMPP query. Othwerwise
we will be ignoring IGMP queries coming from other
hosts on the same subnet.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Reviewed-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agopimd: fix IGMP source address on transmit
Nathan Bahr [Wed, 19 Aug 2020 19:42:07 +0000 (14:42 -0500)]
pimd: fix IGMP source address on transmit

IGMP queries should contain the source address of the IGMP socket
they are being sent from.
Added binding the IGMP sockets to their specific source, otherwise
interfaces with multiple addresses will send multiple queries using
the same source, which is determined by the kernel.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Reviewed-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agopimd: fix IGMP receive handling
Nathan Bahr [Wed, 19 Aug 2020 19:26:41 +0000 (14:26 -0500)]
pimd: fix IGMP receive handling

IGMP packets received from a source that does not match the subnet
of any configured addresses on the receive interface should be
ignored.
Also, find and use the correct IGMP socket object for the received
IGMP packet.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agoospfd: Coverity corrections
Olivier Dugeon [Wed, 26 Aug 2020 15:27:16 +0000 (17:27 +0200)]
ospfd: Coverity corrections

Following PR #6726, Coverity Scan detected some new errors in the OSPF Segment
Routing code. This patch corrects them.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
3 years agoisisd: don't add Adj-SIDs when an IP address is missing
Renato Westphal [Fri, 21 Aug 2020 00:25:24 +0000 (21:25 -0300)]
isisd: don't add Adj-SIDs when an IP address is missing

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoisisd: make vid2string() fully reentrant
Renato Westphal [Fri, 21 Aug 2020 00:24:07 +0000 (21:24 -0300)]
isisd: make vid2string() fully reentrant

Always fill the buffer provided by the user to prevent unexpected
results and make the function fully reentrant.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #7001 from ton31337/fix/deadcode_bgp_show_all_instances_neighbors_vty
Donald Sharp [Wed, 26 Aug 2020 13:27:12 +0000 (09:27 -0400)]
Merge pull request #7001 from ton31337/fix/deadcode_bgp_show_all_instances_neighbors_vty

bgpd: Remove a deadcode freeing JSON in bgp_show_all_instances_neighbors_vty

3 years agoMerge pull request #6903 from ton31337/fix/prevent_null_pointer_dereference_for_aspath
Rafael Zalamena [Wed, 26 Aug 2020 13:07:53 +0000 (10:07 -0300)]
Merge pull request #6903 from ton31337/fix/prevent_null_pointer_dereference_for_aspath

bgpd: Reuse bgp_adj_in for attr to avoid null dereference under aspath

3 years agoMerge pull request #5799 from pguibert6WIND/flowspec_ipv6
Donald Sharp [Wed, 26 Aug 2020 12:26:46 +0000 (08:26 -0400)]
Merge pull request #5799 from pguibert6WIND/flowspec_ipv6

Flowspec ipv6

3 years agobgpd: Remove a deadcode freeing JSON in bgp_show_all_instances_neighbors_vty
Donatas Abraitis [Wed, 26 Aug 2020 05:46:28 +0000 (08:46 +0300)]
bgpd: Remove a deadcode freeing JSON in bgp_show_all_instances_neighbors_vty

json = NULL; is set in a loop above and here we are trying to check and
free the object again which is never be reached.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #6983 from achernavin22/bgp_def_route_rt_map_no_match
Donald Sharp [Tue, 25 Aug 2020 19:32:33 +0000 (15:32 -0400)]
Merge pull request #6983 from achernavin22/bgp_def_route_rt_map_no_match

bgpd: withdraw default route when route-map has no match

3 years agoMerge pull request #6986 from achernavin22/bgp_reset_sess_if_ebgp_multihop
Donald Sharp [Tue, 25 Aug 2020 19:29:24 +0000 (15:29 -0400)]
Merge pull request #6986 from achernavin22/bgp_reset_sess_if_ebgp_multihop

bgpd: reset session if ebgp-multihop is set and no session established

3 years agoMerge pull request #6988 from mjstapp/fix_topo_stop_logic
Donald Sharp [Tue, 25 Aug 2020 18:59:11 +0000 (14:59 -0400)]
Merge pull request #6988 from mjstapp/fix_topo_stop_logic

tests: improve topotest stop logic

3 years agogithub: Add lost chapter witch issue template
ne-vlezay80 [Tue, 25 Aug 2020 18:44:13 +0000 (21:44 +0300)]
github: Add lost chapter witch issue template

Add lost chapter from issue with bug report

Signed-off-by: Alexey Boldyrev <ne-vlezay80@yandex.ru>
3 years agoMerge pull request #6970 from oleg-umnik/patch-1
Renato Westphal [Tue, 25 Aug 2020 16:16:54 +0000 (13:16 -0300)]
Merge pull request #6970 from oleg-umnik/patch-1

doc: vrf socket creation logic

3 years agotests: fix router stop logic
Mark Stapp [Tue, 25 Aug 2020 14:52:17 +0000 (10:52 -0400)]
tests: fix router stop logic

Change the public router stop method to always do a two-phase
shutdown - once without waiting and a second time with a wait.
Ordinary callers need to use this approach when stopping routers.
Move the detailed internal details to a private method that tests
should not call directly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agotests: remove some unused imports
Mark Stapp [Tue, 25 Aug 2020 14:51:47 +0000 (10:51 -0400)]
tests: remove some unused imports

Remove unused imports from some topojson tests

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agotests: include all daemons in all-proto error tests
Mark Stapp [Tue, 25 Aug 2020 14:50:12 +0000 (10:50 -0400)]
tests: include all daemons in all-proto error tests

Some daemons run in all-protocol-startup weren't included in
error-output testing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #6938 from opensourcerouting/bgp-instance-shutdown
Russ White [Tue, 25 Aug 2020 14:31:01 +0000 (10:31 -0400)]
Merge pull request #6938 from opensourcerouting/bgp-instance-shutdown

bgpd: BGP instance administrative shutdown

3 years agobgpd: reset session if ebgp-multihop is set and no session established
Alexander Chernavin [Tue, 25 Aug 2020 13:51:22 +0000 (09:51 -0400)]
bgpd: reset session if ebgp-multihop is set and no session established

If you configure eBGP on loopbacks, you might miss setting the
ebgp-multihop option. Given that, the session will not be established
because of this. Now, the session is in Active state. When you update
your config afterwards and set the ebgp-multihop option to the
appropriate value, the session will still be in Active state. In fact,
it will be stuck in Active state and only services restart will help.

With this change, when set the ebgp-multihop option and no session was
established, reset the session.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoMerge pull request #6975 from opensourcerouting/topotest-zebra-nl-buf-size
Donald Sharp [Tue, 25 Aug 2020 12:00:56 +0000 (08:00 -0400)]
Merge pull request #6975 from opensourcerouting/topotest-zebra-nl-buf-size

topotests: bump zebra netlink socket buffer size

3 years agoMerge pull request #6976 from achernavin22/rip_tools_key_chain_reloading
Donald Sharp [Tue, 25 Aug 2020 11:54:55 +0000 (07:54 -0400)]
Merge pull request #6976 from achernavin22/rip_tools_key_chain_reloading

lib, tools: fix reloading of key sub-context in key chains

3 years agobgpd: withdraw default route when route-map has no match
Alexander Chernavin [Tue, 25 Aug 2020 11:10:47 +0000 (07:10 -0400)]
bgpd: withdraw default route when route-map has no match

If you advertise a default route (via default-originate) only if some
prefix is present in the BGP RIB (route-map specified) and this prefix
becomes unavailable, the default route keeps being advertised.

With this change, when we iterate over the BGP RIB to check if we can
advertise the default route, skip unavailable prefixes.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoMerge pull request #6959 from patrasar/bgp_collision_issue
Russ White [Tue, 25 Aug 2020 11:15:34 +0000 (07:15 -0400)]
Merge pull request #6959 from patrasar/bgp_collision_issue

bgpd: Fix BGP session stuck in OpenConfirm state

3 years agoMerge pull request #6962 from mjstapp/fix_zapi_nh_sort
Russ White [Tue, 25 Aug 2020 11:13:46 +0000 (07:13 -0400)]
Merge pull request #6962 from mjstapp/fix_zapi_nh_sort

lib: zapi nexthop sort fixes

3 years agoMerge pull request #6972 from ton31337/fix/bgp_filtered_routes_count_route-maps
Russ White [Tue, 25 Aug 2020 11:05:16 +0000 (07:05 -0400)]
Merge pull request #6972 from ton31337/fix/bgp_filtered_routes_count_route-maps

bgpd: Honor route-maps when forcing maximum-prefix for filtered routes

3 years agoMerge pull request #6978 from idryzhov/fix-bfdd
Rafael Zalamena [Tue, 25 Aug 2020 10:10:17 +0000 (10:10 +0000)]
Merge pull request #6978 from idryzhov/fix-bfdd

bfdd: fix parameter length

3 years agodoc: vrf socket creation logic
Oleg A. Arkhangelsky [Tue, 25 Aug 2020 05:25:51 +0000 (08:25 +0300)]
doc: vrf socket creation logic

Fix grammar

Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
3 years agoMerge pull request #6726 from Orange-OpenSource/dev_ospf_sr
Renato Westphal [Mon, 24 Aug 2020 19:23:45 +0000 (16:23 -0300)]
Merge pull request #6726 from Orange-OpenSource/dev_ospf_sr

ospfd: Segment Routing Improvement

3 years agoMerge pull request #6963 from chiragshah6/mdev
Renato Westphal [Mon, 24 Aug 2020 19:22:21 +0000 (16:22 -0300)]
Merge pull request #6963 from chiragshah6/mdev

*: record northbound transaction based on control flag

3 years agobgpd: alias for bgp no shutdown cmd
David Schweizer [Mon, 24 Aug 2020 16:16:49 +0000 (18:16 +0200)]
bgpd: alias for bgp no shutdown cmd

* Reverted back to using an ALIAS definition for the negated bgp
  shutdown command with a concatenated message string.
* Unified cli command descriptions for bgp shutdown commands.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agoMerge pull request #6912 from GalaxyGorilla/ospf_ti_lfa_prep
Olivier Dugeon [Mon, 24 Aug 2020 16:12:03 +0000 (18:12 +0200)]
Merge pull request #6912 from GalaxyGorilla/ospf_ti_lfa_prep

ospfd: preparation for TI-LFA

3 years agobfdd: fix parameter length
Igor Ryzhov [Mon, 24 Aug 2020 15:45:53 +0000 (18:45 +0300)]
bfdd: fix parameter length

There is no space reserved for "[source-addr='']".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib, tools: fix reloading of key sub-context in key chains
Alexander Chernavin [Mon, 24 Aug 2020 13:28:28 +0000 (09:28 -0400)]
lib, tools: fix reloading of key sub-context in key chains

When you add a key chain in the RIP configuration file and reload the
configurations via the frr-reload.py script, the script will fail and
the key chain will not appear in the running configuration. The reason
is that frr-reload.py doesn't recognize key as a sub-context.

Before this change, keys were generated this way:

    key chain test
     key 2
      key-string 123
     key 3
      key-string 456

With this change, keys will be generated this way:

    key chain test
     key 2
      key-string 123
     exit
     key 3
      key-string 456
     exit

This will allow frr-reload.py to see the key sub-context and correctly
reload them.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoMerge pull request #6948 from xThaid/proactive_arp
Rafael Zalamena [Mon, 24 Aug 2020 11:35:34 +0000 (11:35 +0000)]
Merge pull request #6948 from xThaid/proactive_arp

ospfd: make proactive ARP configurable

3 years agobgpd: minor fix for shutdown cli commands
David Schweizer [Mon, 24 Aug 2020 11:33:39 +0000 (13:33 +0200)]
bgpd: minor fix for shutdown cli commands

* Changed command description string to use "Remove" instead of
  "Disable" to prevent user confusion due to double negation.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agotopotests: bump zebra netlink socket buffer size
Rafael Zalamena [Mon, 24 Aug 2020 10:29:23 +0000 (07:29 -0300)]
topotests: bump zebra netlink socket buffer size

Use the same value as we use in production release configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: Add docs for ospf proactive-arp command
Jakub Urbańczyk [Fri, 21 Aug 2020 11:50:01 +0000 (13:50 +0200)]
doc: Add docs for ospf proactive-arp command

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
3 years agobgpd: additional no bgp shutdown cli command
David Schweizer [Mon, 24 Aug 2020 06:12:16 +0000 (08:12 +0200)]
bgpd: additional no bgp shutdown cli command

* Added a "no bgp shutdown message MSG..." cli command for ease of use
  with copy/paste. Because of current limitations with DEFPY/ALIAS and
  the message string concatenation, a new command instead of an ALIAS
  had to be implemented.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agoMerge pull request #6967 from mjstapp/fix_sa_rib_dest
Rafael Zalamena [Sun, 23 Aug 2020 12:19:49 +0000 (12:19 +0000)]
Merge pull request #6967 from mjstapp/fix_sa_rib_dest

zebra: fix SA warning in rib_process()

3 years agoMerge pull request #6952 from opensourcerouting/fix_python27_build
Donatas Abraitis [Sat, 22 Aug 2020 19:07:18 +0000 (22:07 +0300)]
Merge pull request #6952 from opensourcerouting/fix_python27_build

python: Make FRR build compatible with python 2.7 and 3.x

3 years agobgpd: Honor route-maps when forcing maximum-prefix for filtered routes
Donatas Abraitis [Sat, 22 Aug 2020 15:21:27 +0000 (18:21 +0300)]
bgpd: Honor route-maps when forcing maximum-prefix for filtered routes

This will check route-maps as well, not only prefix-lists, access-lists, and
filter-lists.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agodoc: vrf socket creation logic
Oleg A. Arkhangelsky [Fri, 21 Aug 2020 17:16:03 +0000 (20:16 +0300)]
doc: vrf socket creation logic

Make documentation consistent with 0556fc3 changes.

Signed-off-by: Oleg A. Arkhangelsky <sysoleg@yandex.ru>
3 years agozebra: fix SA warning in rib_process()
Mark Stapp [Fri, 21 Aug 2020 13:34:19 +0000 (09:34 -0400)]
zebra: fix SA warning in rib_process()

Fix an SA warning about a possible NULL pointer deref in
rib_process().

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agotests: Cleanup and fix error message in bgp_features testsuite
Martin Winter [Fri, 21 Aug 2020 11:46:02 +0000 (13:46 +0200)]
tests: Cleanup and fix error message in bgp_features testsuite

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agobgpd: fix Dereference of null pointer in flowspec
Philippe Guibert [Fri, 21 Aug 2020 06:42:20 +0000 (08:42 +0200)]
bgpd: fix Dereference of null pointer in flowspec

a dereference of null pointer exists in current flowspec code, with
prefix pointer. check validity of pointer before going ahead.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: remove warnings related to line too longs in bgp code
Philippe Guibert [Thu, 2 Jul 2020 06:14:41 +0000 (08:14 +0200)]
bgpd: remove warnings related to line too longs in bgp code

remove warnings related to line too long in bgp code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: do not forget to set the size of community val length
Philippe Guibert [Wed, 17 Jun 2020 13:10:37 +0000 (15:10 +0200)]
bgpd: do not forget to set the size of community val length

because ecommunity structure can host both ext community and ipv6 ext
community, do not forget to set the unit_size field.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: remove sprintf() usage on flowspec
Philippe Guibert [Tue, 16 Jun 2020 06:42:10 +0000 (08:42 +0200)]
bgpd: remove sprintf() usage on flowspec

flowspec is being removed from remaining sprintf() calls.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgp, zebra: add some alignments with remarks from community
Philippe Guibert [Mon, 20 Apr 2020 16:02:46 +0000 (18:02 +0200)]
bgp, zebra: add some alignments with remarks from community

align the code to remarks from community.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agotopotest: add bgp flowspec ipv4/ipv6 test
Philippe Guibert [Mon, 20 Apr 2020 08:52:57 +0000 (10:52 +0200)]
topotest: add bgp flowspec ipv4/ipv6 test

this test ensures that an incoming bgp ipv4 and ipv6 flowspec
entry is received with a nexthop IP associated.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: add bgp flowspec ipv6 documentation
Philippe Guibert [Mon, 20 Apr 2020 07:18:20 +0000 (09:18 +0200)]
doc: add bgp flowspec ipv6 documentation

add bgp flowspdec ipv6 documentation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: fill in local ecommunity context with ecom unit length
Philippe Guibert [Tue, 22 Oct 2019 07:21:28 +0000 (09:21 +0200)]
bgpd: fill in local ecommunity context with ecom unit length

because the same extended community can be used for storing ipv6 and
ipv4 et communities, the unit length must be stored. do not forget to
set the standard value in bgp evpn.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: fallback proto icmp/v6 to appropriate l3 filter
Philippe Guibert [Mon, 21 Oct 2019 09:12:25 +0000 (11:12 +0200)]
bgpd: fallback proto icmp/v6 to appropriate l3 filter

if match protocol is icmp, then this protocol will be filtered with afi
= ipv4. however, if afi = ipv6, then the icmp protocol will fall back to
icmpv6.
note that this patch has also been done to simplify the policy routing,
as BGP will only handle TCP/UDP/ICMP(v4 or v6) protocols.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: limit policy routing with flowlabel, fragment, and prefix offset
Philippe Guibert [Mon, 21 Oct 2019 09:05:44 +0000 (11:05 +0200)]
bgpd: limit policy routing with flowlabel, fragment, and prefix offset

the following 3 options are not supported in current implementation of
policy routing. for that, inform the user that the flowspec entry is
invalid when attempting to use :
- prefix offset with src, or dst ipv6 address ( see [1])
- flowlabel value - limitation due to [0]
- fragment ( implementation not done today).

[0] https://bugzilla.netfilter.org/show_bug.cgi?id=1375
[1] https://bugzilla.netfilter.org/show_bug.cgi?id=1373

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: add icmpv6 table of type / code
Philippe Guibert [Fri, 18 Oct 2019 20:30:24 +0000 (22:30 +0200)]
zebra: add icmpv6 table of type / code

this table contains the list of icmp type/code for icmpv6.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: support for flowspec interface list per address-family
Philippe Guibert [Thu, 17 Oct 2019 14:11:57 +0000 (16:11 +0200)]
bgpd: support for flowspec interface list per address-family

in addition to ipv4 flowspec, ipv6 flowspec address family can configure
its own list of interfaces to monitor. this permits filtering the policy
routing only on some interfaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: support for bgp ipv6 ext community, and flowspec redirect ipv6
Philippe Guibert [Thu, 17 Oct 2019 14:08:16 +0000 (16:08 +0200)]
bgpd: support for bgp ipv6 ext community, and flowspec redirect ipv6

rfc 5701 is supported. it is possible to configure in bgp vpn, a list of
route target with ipv6 external communities to import. it is to be noted
that this ipv6 external community has been developed only for matching a
bgp flowspec update with same ipv6 ext commmunity.
adding to this, draft-ietf-idr-flow-spec-v6-09 is implemented regarding
the redirect ipv6 option.

Practically, under bgp vpn, under ipv6 unicast, it is possible to
configure : [no] rt6 redirect import <IPV6>:<AS> values.

An incoming bgp update with fs ipv6 and that option matching a bgp vrf,
will be imported in that bgp vrf.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgp, zebra: add family attribute to ipset and iptable context
Philippe Guibert [Wed, 16 Oct 2019 09:07:41 +0000 (11:07 +0200)]
bgp, zebra: add family attribute to ipset and iptable context

in order to create appropriate policy route, family attribute is stored
in ipset and iptable zapi contexts. This commit also adds the flow label
attribute in iptables, for further usage.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: support for redirect ipv6 simpson method
Philippe Guibert [Wed, 16 Oct 2019 08:05:36 +0000 (10:05 +0200)]
bgpd: support for redirect ipv6 simpson method

this commit supports [0] where ipv6 address is encoded in nexthop
attribute of nlri, and not in bgp redirect ip extended community. the
community contains only duplicate information or not.
Adding to this, because an action or a rule needs to apply to either
ipv4 or ipv6 flow, modify some internal structures so as to be aware of
which flow needs to be filtered. This work is needed when an ipv6
flowspec rule without ip addresses is mentioned, we need to know which
afi is served. Also, this work will be useful when doing redirect VRF.

[0] draft-simpson-idr-flowspec-redirect-02.txt

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd, lib: support for flow_label flowspec type
Philippe Guibert [Wed, 16 Oct 2019 06:44:20 +0000 (08:44 +0200)]
bgpd, lib: support for flow_label flowspec type

in ipv6 flowspec, a new type is defined to be able to do filtering rules
based on 20 bits flow label field as depicted in [0]. The change include
the decoding by flowspec, and the addition of a new attribute in policy
routing rule, so that the data is ready to be sent to zebra.
The commit also includes a check on fragment option, since dont fragment
bit does not exist in ipv6, the value should always be set to 0,
otherwise the flowspec rule becomes invalid.

[0] https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-09

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: ipv6 flowspec address decoding and validation
Philippe Guibert [Wed, 16 Oct 2019 06:42:30 +0000 (08:42 +0200)]
bgpd: ipv6 flowspec address decoding and validation

as per [0], ipv6 adress format introduces an ipv6 offset that needs to
be extracted too. The change include the validation, decoding for
further usage with policy-routing and decoding for dumping.

[0] https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-09

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: flowspec code support for ipv6
Philippe Guibert [Mon, 14 Oct 2019 16:02:22 +0000 (18:02 +0200)]
bgpd: flowspec code support for ipv6

until now, the assumption was done in bgp flowspec code that the
information contained was an ipv4 flowspec prefix. now that it is
possible to handle ipv4 or ipv6 flowspec prefixes, that information is
stored in prefix_flowspec attribute. Also, some unlocking is done in
order to process ipv4 and ipv6 flowspec entries.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agolib: add family attribute for flowspec prefix structure
Philippe Guibert [Tue, 15 Oct 2019 13:01:39 +0000 (15:01 +0200)]
lib: add family attribute for flowspec prefix structure

to recognize whether a flowspec prefix has been carried out by
ipv4 flowspec or ipv6 flowspec ( actually, the hypothesis is that only
ipv4 flowspec is supported), then a new attribute should contain the
family value: AF_INET or AF_INET6. That value will be further used in
the BGP flowspec code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: Fix BGP session stuck in OpenConfirm state
Sarita Patra [Fri, 21 Aug 2020 06:33:09 +0000 (23:33 -0700)]
bgpd: Fix BGP session stuck in OpenConfirm state

Issue:
1. Initially BGP start listening to socket.
2. Start timer expires and BGP tries to connect to peer and moved
   to Idle->connect (lets say peer datastructre X)
3. Connect for X succeeds and hence moved from idle ->connect with
   FD-x.
4. A incoming connection is accepted and a new peer datastructure Y
   is created with FD-y moves from idle->Active state.
5. Peer datastercture Y FD-y sends out OPEN and moves to
   Active->Opensent state.
6. Peer datastrcture Y FD-y receives OPEN and moved from Opensent->
   Openconfirm state.
7. Meanwhile on peer datastrcture X FD-x sends out a OPEN message
   and moved from connect->Opensent.
8. For peer datastrcture Y FD-y keep alive is received and it is
   moved from OpenConfirm->Established.
9. In this case peer datastructure Y FD-y is a accepted connection
   so we try to copy all its parameter to peer datastructure X and
   delete Y.
10. During this process TCP connection for the accepted connection
    (FD-y) goes down and hence get remote address and port fails.
11. With this failure bgp_stop function for both peer datastrure X
    and peer datastructure Y is called.
12. By this time all the parameters include state for datastrcture
    for X and Y are exchanged. Peer Y FD-y when it entered this
    function had state OpenConfirm still which has been moved to peer
    datastrcture X.
13. In bgp_stop it will stop all the timers and take action only if
    peer is in established state. Now that peer datastrcture X and Y
    are not in established state (in this function) it will simply
    close all timers and close the socket and assigns socket for both
    the peer datastrcture to -1.
14. Peer datastrcture Y will be deleted as it is a datastrcture created
    due to accept of connection where as peer datastrcture X will be held
    as it is created with configuration.
15. Now peer datastrcture X now holds a state of OpenConfirm without any
    timers running.
16. With this any new incoming connection will never be able to establish
    as there is config connection X which is stuck in OpenConfirm.

Fix:
 While transferring the peer datastructure Y FD-y (accepted connection)
 to the peer datastructure X, if TCP connection for FD-y goes down, then
 1. Call fsm event bgp_stop for X (do cleanup with bgp_stop and move the
    state to Idle) and
 2. Call fsm event bgp_stop for Y (do cleanup with bgp_stop and gets deleted
    since it is an accept connection).

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agobgpd: Don't stop hold timer in OpenConfirm State
Sarita Patra [Fri, 21 Aug 2020 06:29:08 +0000 (23:29 -0700)]
bgpd: Don't stop hold timer in OpenConfirm State

Issue:

1. Initially BGP start listening to socket.
2. Start timer expires and BGP tries to connect to peer and moved
   to Idle->connect (lets say peer datastructre X)
3. Peer datastrcture Y FD-X receives OPEN and moved from Opensent->
   Openconfirm state and start the hold timer.
4. In the OpenConfirm state, the hold timer is stopped. So peer X
   waits for Keepalive message from peer. If the Keepalive message
   is not received, then it will be in OpenConfirm state for
   indefinite time.
5. Due to this it neither close the existing connection nor it will
   accept any connection from peer.

Fix:
In the OpenConfirm state, don't stop the hold timer.
 1. Upon receipt of a neighbor’s Keepalive, the state is moved to
    Established.
 2. But If the hold timer expires, a stop event occurs, the state
    is moved to Idle.
This is as per RFC.

Signed-off-by: Sarita Patra <saritap@vmware.com>
3 years agoMerge pull request #6955 from opensourcerouting/staticd-optional-color
Donald Sharp [Fri, 21 Aug 2020 00:14:33 +0000 (20:14 -0400)]
Merge pull request #6955 from opensourcerouting/staticd-optional-color

staticd: fix warning when creating routes without SR-TE colors

3 years agoMerge pull request #6960 from opensourcerouting/sysrepo-plugin-update
Donald Sharp [Fri, 21 Aug 2020 00:11:15 +0000 (20:11 -0400)]
Merge pull request #6960 from opensourcerouting/sysrepo-plugin-update

lib: adapt plugin to use new Sysrepo version

3 years agotests: Add new bgp_features testsuite with test for bgp shutdown
Martin Winter [Thu, 20 Aug 2020 23:36:21 +0000 (01:36 +0200)]
tests: Add new bgp_features testsuite with test for bgp shutdown

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years ago*: record transaction based on control flag
Chirag Shah [Thu, 20 Aug 2020 19:09:53 +0000 (12:09 -0700)]
*: record transaction based on control flag

In case of config rollback is enabled,
record northbound transaction based on a control flag.
The actual frr daemons would set the flag to true via
nb_init from frr_init.
This will allow test daemon to bypass recording
transacation to db.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agolib: zapi nexthop sort fixes
Mark Stapp [Thu, 20 Aug 2020 18:50:38 +0000 (14:50 -0400)]
lib: zapi nexthop sort fixes

The sorting for zapi nexthops in zapi routes needs to match
the sorting of nexthops done in zebra. Ensure all zapi_nexthop
attributes are included in the sort.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agolib: add yang modules to native module list
Chirag Shah [Wed, 19 Aug 2020 21:00:41 +0000 (14:00 -0700)]
lib: add yang modules to native module list

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agoospfd: make proactive ARP configurable
Jakub Urbańczyk [Wed, 19 Aug 2020 12:19:19 +0000 (14:19 +0200)]
ospfd: make proactive ARP configurable

OSPFD sends ARP proactively to speed up convergence for /32 networks
on a p2p connection. It is only an optimization, so it can be disabled.

It is enabled by default.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
3 years agolib: adapt plugin to use new Sysrepo version
Renato Westphal [Wed, 19 Aug 2020 23:33:40 +0000 (20:33 -0300)]
lib: adapt plugin to use new Sysrepo version

Sysrepo recently underwent a complete rewrite, where some substantial
architectural changes were made (the most important one being the
extinction of the sysrepod daemon). While most of the existing API
was preserved, quite a few backward-incompatible changes [1] were
introduced (mostly simplifications). This commit adapts our sysrepo
northbound plugin to those API changes in order for it to be compatible
with the latest Sysrepo version.

Additional notes:
* The old Sysrepo version is EOL and not supported anymore.
* The new Sysrepo version requires libyang 1.x.

Closes #6936

[1] https://github.com/sysrepo/sysrepo/blob/devel/CHANGES

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agobgpd: minor fix and code style compliance
David Schweizer [Thu, 20 Aug 2020 14:50:21 +0000 (16:50 +0200)]
bgpd: minor fix and code style compliance

* Applied style suggestions by automated compliance check.
* Fixed function bgp_shutdown_enable to use immutable message string.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
3 years agoMerge pull request #6951 from donaldsharp/zebra_table
Rafael Zalamena [Thu, 20 Aug 2020 14:25:14 +0000 (14:25 +0000)]
Merge pull request #6951 from donaldsharp/zebra_table

zebra: Add table id to debug output

3 years agoMerge pull request #6924 from AnuradhaKaruppiah/mem-fixes
Rafael Zalamena [Thu, 20 Aug 2020 14:12:51 +0000 (14:12 +0000)]
Merge pull request #6924 from AnuradhaKaruppiah/mem-fixes

bgpd: fixes for problems found during EVPN fuzzing

3 years agoOSPFd: Correct Extended Prefix flooding for SR
Olivier Dugeon [Thu, 9 Jul 2020 08:51:58 +0000 (10:51 +0200)]
OSPFd: Correct Extended Prefix flooding for SR

PR #6416 that solves opsf crash when segment routing is restarted, introduce a
regression in Extended Prefix flooding: when segment routing prefix is modified
or removed, new segment routing prefix is no more flooded. This patch correct
this regression.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
3 years agoOSPFd: Explicit Null option for Segment-Routing
Olivier Dugeon [Wed, 8 Jul 2020 18:12:19 +0000 (20:12 +0200)]
OSPFd: Explicit Null option for Segment-Routing

Add new option to `segment-routing prefix` command to set the
Explcit Null flag in addition to the No-PHP flag. MPLS LFIB configuration
has been also updated to take into account the Explicit Null flag.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>