]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agozebra: use const on fill_seg6ipt_encap func
Hiroki Shirokura [Mon, 22 Mar 2021 09:48:04 +0000 (09:48 +0000)]
zebra: use const on fill_seg6ipt_encap func

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: fix implicit conversion
Hiroki Shirokura [Mon, 22 Mar 2021 09:28:32 +0000 (09:28 +0000)]
zebra: fix implicit conversion

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: eliminate redundant info from srv6 locator zapi
Hiroki Shirokura [Mon, 22 Mar 2021 09:07:18 +0000 (09:07 +0000)]
*: eliminate redundant info from srv6 locator zapi

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotests: fix json style on srv6_locator test
Hiroki Shirokura [Mon, 22 Mar 2021 08:23:08 +0000 (08:23 +0000)]
tests: fix json style on srv6_locator test

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: drop un-needed info in locator-zapi
Hiroki Shirokura [Mon, 22 Mar 2021 02:24:06 +0000 (02:24 +0000)]
zebra: drop un-needed info in locator-zapi

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: delete unneeded zebra_srv6_manager_connect
Hiroki Shirokura [Mon, 22 Mar 2021 01:45:33 +0000 (01:45 +0000)]
zebra: delete unneeded zebra_srv6_manager_connect

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: erase wrong comments by copy-paste
Hiroki Shirokura [Mon, 22 Mar 2021 01:09:16 +0000 (01:09 +0000)]
lib: erase wrong comments by copy-paste

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: eliminate odd line-break
Hiroki Shirokura [Mon, 22 Mar 2021 00:57:03 +0000 (00:57 +0000)]
lib: eliminate odd line-break

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: integrate srv6-nexthop-cmp functions
Hiroki Shirokura [Mon, 22 Mar 2021 00:52:11 +0000 (00:52 +0000)]
lib: integrate srv6-nexthop-cmp functions

I agree with the PR review from mstap and merged
the following two functions into one.

- zapi_nexthop_seg6_cmp
- zapi_nexthop_seg6local_cmp

[note]
If both of them have more complex extensions in the future,
I think it will be less confusing to remove the integration
of these functions and make them as separate functions as
before.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: use one line init instead of memset and format it
Hiroki Shirokura [Mon, 22 Mar 2021 00:31:56 +0000 (00:31 +0000)]
*: use one line init instead of memset and format it

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: fix json style to camel-case instead of underscores
Hiroki Shirokura [Mon, 22 Mar 2021 00:04:06 +0000 (00:04 +0000)]
lib: fix json style to camel-case instead of underscores

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: fix typo
Hiroki Shirokura [Mon, 8 Mar 2021 15:05:49 +0000 (15:05 +0000)]
zebra: fix typo

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: fix build error for NetBSD8
Hiroki Shirokura [Wed, 24 Feb 2021 11:52:30 +0000 (11:52 +0000)]
bgpd: fix build error for NetBSD8

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: fix Dereference of null pointer
Hiroki Shirokura [Wed, 24 Feb 2021 11:28:59 +0000 (11:28 +0000)]
zebra: fix Dereference of null pointer

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: fix code format accourding to checkpatch
Hiroki Shirokura [Wed, 24 Feb 2021 09:36:09 +0000 (09:36 +0000)]
*: fix code format accourding to checkpatch

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: ignore nexthop validation for srv6-vpn
Hiroki Shirokura [Tue, 9 Feb 2021 05:26:22 +0000 (05:26 +0000)]
bgpd: ignore nexthop validation for srv6-vpn

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: use zapi_srv6_locator_chunk_decode
Hiroki Shirokura [Thu, 31 Dec 2020 11:57:03 +0000 (11:57 +0000)]
bgpd: use zapi_srv6_locator_chunk_decode

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: add zapi_srv6_locator_chunk_{en,de}code
Hiroki Shirokura [Thu, 31 Dec 2020 11:56:32 +0000 (11:56 +0000)]
zebra: add zapi_srv6_locator_chunk_{en,de}code

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agodoc: fix srv6 section according to review
Hiroki Shirokura [Wed, 30 Dec 2020 02:16:44 +0000 (02:16 +0000)]
doc: fix srv6 section according to review

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: fix vrf route-leaking crash around srv6
Hiroki Shirokura [Wed, 30 Dec 2020 01:19:20 +0000 (01:19 +0000)]
bgpd: fix vrf route-leaking crash around srv6

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: fix compile error for BSD platforms
Hiroki Shirokura [Tue, 29 Dec 2020 10:56:38 +0000 (10:56 +0000)]
bgpd: fix compile error for BSD platforms

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: fix compile error of missing-braces
Hiroki Shirokura [Tue, 29 Dec 2020 10:55:50 +0000 (10:55 +0000)]
zebra: fix compile error of missing-braces

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: fix crash when bgp_delete found by unit-test
Hiroki Shirokura [Tue, 29 Dec 2020 08:23:34 +0000 (08:23 +0000)]
bgpd: fix crash when bgp_delete found by unit-test

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: rewrite locator_prefix_cmd with DEFPY
Hiroki Shirokura [Tue, 29 Dec 2020 07:30:47 +0000 (07:30 +0000)]
zebra: rewrite locator_prefix_cmd with DEFPY

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: fix code format accourding to checkpatch
Hiroki Shirokura [Wed, 24 Feb 2021 10:10:06 +0000 (10:10 +0000)]
*: fix code format accourding to checkpatch

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: bgp_srv6l3vpn_to_bgp_vrf (step4)
Hiroki Shirokura [Fri, 18 Dec 2020 23:40:22 +0000 (08:40 +0900)]
topotests: bgp_srv6l3vpn_to_bgp_vrf (step4)

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: install vpn's transit route using H.Encaps (step4)
Hiroki Shirokura [Fri, 18 Dec 2020 22:53:03 +0000 (07:53 +0900)]
bgpd: install vpn's transit route using H.Encaps (step4)

This commit make bgpd to support install H.Encaps(seg6 mode segs) routes
when VPN-prefix has Prefix-sid.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: advertising vpn-rib include SRv6-SID (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 02:07:16 +0000 (11:07 +0900)]
bgpd: advertising vpn-rib include SRv6-SID (step4)

This commit make bgpd to support VPN SID advertisement
as BGP Prefix-SID when route-leaking from BGP-vrf instance
to BGP-vpn instance.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: cli for checking srv6 information (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 01:14:08 +0000 (10:14 +0900)]
bgpd: cli for checking srv6 information (step4)

This commit add cli to check bgp's srv6 status
which is srv6-locator name and its locator-chunks
for bgpd. And this command also can be used to
check tovpn_sid for each bgp instances.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: cli for SRv6 SID alloc to redirect to vrf (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 02:04:40 +0000 (11:04 +0900)]
bgpd: cli for SRv6 SID alloc to redirect to vrf (step4)

This commit add cil to configure BGP SRv6-VPN sid allocation.
Almost mechanism are based on BGP MPLS-VPN.

User can allocate and export sid with using following config.
Then bgpd try to allocate new SID to redirect vpn to vrf using
SRv6 localsid End.DT4/DT6. Currently linux kernel will regect
End.DT4 route install due to no-implementation.
(at-least today's FRR's ci kernel.)

So now we only supports BGP SRv6-VPNv6.

router bgp 1
 segment-routing srv6
  locator loc1
 !
 address-family ipv6 vpn
 exit-address-family
!
router bgp 1 vrf vrf10
 address-family ipv6 unicast
  sid vpn export 1    !!(option1)!!
  sid vpn export auto !!(option2)!!
 exit-address-family
!

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: cli for srv6-locator assignment (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 01:50:18 +0000 (10:50 +0900)]
bgpd: cli for srv6-locator assignment (step4)

This commit add command to speficy SRv6 locator for BGP SRv6-VPN.
CLI example is follow. CLI block of "segment-routing" is already
implemented by previous commits and it's managed by zebra.

Zebra manage just the ownership of locator's prefix.
Zlient can request to get srv6-locator's prefix chunk using
srv6_manager_get_locator_chunk() which is usuful func to
execute ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK api. This request
is wokring as async, And zebra calls same api to Zclients when
zebra allocate locator prefix chunk.

And then, finally zclient(bgpd) catch the information via
process_srv6_lcoator_chunk callback function.

router bgp 1
 segment-routing srv6
  locator loc1
 !
!
segment-routing
 srv6
  locators
   locator loc1
    prefix 2001:db8:1:1::/64
   !
  !
 !
!

[POINT_OF_REVIEW]
In current implementation, user can just configure srv6 locator
but user can't de-configure srv6 locator.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: add srv6 vpn base code (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 08:45:26 +0000 (17:45 +0900)]
bgpd: add srv6 vpn base code (step4)

This commit add base-lines for BGP SRv6 VPN support.
srv6_locator_chunks property of struct bgp is used
to store BGPd's own SRv6 locator chunk getting with
ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK api.
And srv6_functions is used to store BGP's srv6
localsids. It's mainly used when new SID reservation
from locator chunks.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
base

3 years agobgpd: implement nb-func to im/ex-port vrf-rib to vpn-rib (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 01:42:44 +0000 (10:42 +0900)]
bgpd: implement nb-func to im/ex-port vrf-rib to vpn-rib (step4)

This commit implement the contents of following 2 functions.
- bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vpn_modify
- bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_vpn_modify

This implementation is based on already implemented function for ipv4.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: add usual func to install SRv6 localsid (step4)
Hiroki Shirokura [Sat, 19 Dec 2020 00:28:38 +0000 (09:28 +0900)]
lib: add usual func to install SRv6 localsid (step4)

This commit add usuful function to configure SRv6 localsid
which is represented with seg6local lwt route.
Now, it can support only NEXTHOP_TYPE_IFINDEX route.
Actual configurationof SRv6 localsid is performed with
ZEBRA_ROUTE_ADD. So this is just a wrapper function
for route-install.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: new cli-nodes for BGP SRv6 VPNv4 (step4)
Hiroki Shirokura [Fri, 18 Dec 2020 23:47:11 +0000 (08:47 +0900)]
*: new cli-nodes for BGP SRv6 VPNv4 (step4)

This commit add just CLI-nodes for MP-BGP VPN configuration
with SRv6 backend rather than MPLS. Actual configuration cli
will be implemented after this commit.

Example Configuration follow.
This cli design is based on Cisco IOS-XR but actual cli
tree design is defferent between FRR and Cisco.
It's just based on cisco.

ref:
https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-6/segment-routing/configuration/guide/b-segment-routing-cg-asr9000-66x/b-segment-routing-cg-asr9000-66x_chapter_011.html#concept_hwj_trf_dlb

router bgp 1
 bgp router-id 1.1.1.1
 !
 segment-routing srv6 ! new cli-node
  locator LOC1 ! this cli will be added after this commit.
 !
!

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: fix prefix-sid crash bug and add topotest (step4)
Hiroki Shirokura [Thu, 24 Dec 2020 04:07:39 +0000 (04:07 +0000)]
bgpd: fix prefix-sid crash bug and add topotest (step4)

This commit fix bgpd's prefix-sid type4,5 feature which has
miss implementation from https://github.com/FRRouting/frr/pull/5653
was merged. Due to some nessesary lines are not presented.

When bgpd receives multi update message with same service-sid on
prefix-sid type-5 attribute, bgpd will crash arround path-attribute's
values object reference count.

And also, this commit add a topotest to check that feature work fine.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: fix code format accourding to checkpatch
Hiroki Shirokura [Wed, 24 Feb 2021 10:47:05 +0000 (10:47 +0000)]
*: fix code format accourding to checkpatch

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: for zapi's seg6 route configuration (step3)
Hiroki Shirokura [Fri, 18 Dec 2020 13:11:19 +0000 (22:11 +0900)]
topotests: for zapi's seg6 route configuration (step3)

This commit checks seg6 route configuration via ZAPI is
working fine.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agosharpd: install route supports nexthop-seg6 (step3)
Hiroki Shirokura [Fri, 18 Dec 2020 12:18:12 +0000 (21:18 +0900)]
sharpd: install route supports nexthop-seg6 (step3)

We can install seg6 routes from shapd cli.
This is for the behaviour test(topotest) to ensure
SRv6 ZAPI is working fine.

NEW-CLI:
sharp install routes 1::1 nexthop-seg6 2001::1 encap a::

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: parse non-zebra seg6 configuration via netlink (step3)
Hiroki Shirokura [Fri, 18 Dec 2020 12:41:19 +0000 (21:41 +0900)]
zebra: parse non-zebra seg6 configuration via netlink (step3)

FRRouting operator can install seg6 route via ZAPI,
But linux kernel operator also can install seg6 route
via Netlink directry (i.e. iproute2)

This commit make zebra to parse non-frr seg6 route
configuration via netlink and audit Zebra's RIB.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: ZEBRA_ROUTE_ADD supports seg6 route (step3)
Hiroki Shirokura [Thu, 17 Dec 2020 14:43:01 +0000 (23:43 +0900)]
zebra: ZEBRA_ROUTE_ADD supports seg6 route (step3)

With this patch, zclient can intall seg6 rotues when
they set properties "nh_seg6_segs" on struct nexthop
and set ZEBRA_FLAG_SEG6_ROUTE on zapi_route's flag.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: add new nexthop's attributes seg6 (step3)
Hiroki Shirokura [Thu, 17 Dec 2020 13:45:58 +0000 (22:45 +0900)]
lib: add new nexthop's attributes seg6 (step3)

This commit add new nexthop's addional object for SRv6
routing about seg6 route. Before this commit,
we can add MPLS info as additional object on nexthop.
This commit make it add more support about seg6 routes.

seg6 routes are ones of the LWT routing mechanism,
so configuration of seg6local routes is performed by
ZEBRA_ROUTE_SEND, it's same as MPLS configuration.

Real configuration implementation isn't implemented at
this commit. later commit add that. This commit add
only nexthop additional object and some misc functions.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agodoc: add new section for srv6 configuration (step2)
Hiroki Shirokura [Sun, 23 Feb 2020 16:58:09 +0000 (16:58 +0000)]
doc: add new section for srv6 configuration (step2)

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: keep srv6-locator feature fine (step2)
Hiroki Shirokura [Sun, 23 Feb 2020 05:37:24 +0000 (05:37 +0000)]
topotests: keep srv6-locator feature fine (step2)

This commit is a part of #5853 works.
This commit add new topotest to verify SRv6-manager's functionality.
Following tests are performed on this topotest.

- check that SRv6-locator is set correctly
- check that default SRv6-function locator is set correctly
- check that SRv6-function is installed as ipv6 route correctly

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agosharpd: support create/delete srv6-locator (step2)
Hiroki Shirokura [Sun, 11 Oct 2020 08:27:40 +0000 (17:27 +0900)]
sharpd: support create/delete srv6-locator (step2)

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: add new CLI to manipulate srv6-locator (step2)
Hiroki Shirokura [Sun, 23 Feb 2020 11:38:26 +0000 (11:38 +0000)]
zebra: add new CLI to manipulate srv6-locator (step2)

This commit is a part of #5853 works that add new clis to
configure SRv6 locator and its show commands.
Following clis are added on this commit.

vtysh -c 'conf te' \
  -c 'segment-routing' \
  -c ' srv6' \
  -c '  locators' \
  -c '   locator LOC1' \
  -c '    prefix A::/64'

- "show segment-routing srv6 sid [json]"
- "show segment-routing srv6 locator [json]"
- "show segment-routing srv6 locator NAME detail [json]"
- "show runnning-config" (make it to print srv6 configuration)

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: ZAPI add new api to manipulate srv6-locator (step2)
Hiroki Shirokura [Wed, 9 Dec 2020 09:52:17 +0000 (18:52 +0900)]
zebra: ZAPI add new api to manipulate srv6-locator (step2)

This commit is a part of #5853 works that add new ZAPI to
configure SRv6 locator which manages chunk prefix for
SRv6 SID IPv6 address for each routing protocol daemons.

NEW-ZAPIs:
* ZEBRA_SRV6_LOCATOR_ADD
* ZEBRA_SRV6_LOCATOR_DELETE
* ZEBRA_SRV6_MANAGER_CONNECT
* ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK
* ZEBRA_SRV6_MANAGER_RELEASE_LOCATOR_CHUNK

Zclient can connect to zebra's srv6-manager with
ZEBRA_SRV6_MANAGER_CONNECT api like a label-manager.
Then zclient uses ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK to
allocated dedicated locator chunk for it's routing protocol.
Zebra works for only prefix reservation and distribute
the ownership of the locator chunks for zcliens.

Then, zclient installs SRv6 function with
ZEBRA_ROUTE_ADD api with nh_seg6local_* fields.
This feature is already implemented by another PR(#7680).

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: add new structures for srv6-locator (step2)
Hiroki Shirokura [Sun, 23 Feb 2020 11:27:15 +0000 (11:27 +0000)]
lib: add new structures for srv6-locator (step2)

This commit is a part of #5853 works that add new structures for
SRv6-locator. This structure will be used by zebra and another
routing daemon and its ZAPI messaging to manage SRv6-locator.
Encoder/decoder for ZAPI stream is also added by this commit.

Real configuration mechanism isn't implemented at this commit.
later commit add real configure implementation. This commit add only
SRv6-locator's structures and misc functions.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years ago*: new cli-nodes for SRv6 manager (step2)
Hiroki Shirokura [Wed, 30 Sep 2020 03:59:19 +0000 (12:59 +0900)]
*: new cli-nodes for SRv6 manager (step2)

This commit is a part of #5853 that add new cmd-node for SRv6 configuration.
This commit just add cmd-node and moving node cli only, acutual SRv6 config
command isn't added. (that is added later commit. of this branch)

new cli nodes:
* SRv6
* SRv6-locators
* SRv6-locator

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agotopotests: for zapi's seg6local route configuration (step1)
Hiroki Shirokura [Sun, 6 Dec 2020 03:37:24 +0000 (12:37 +0900)]
topotests: for zapi's seg6local route configuration (step1)

This commit checks seg6local route configuration via ZAPI is
working fine.

SRv6 feature is little young feature as kernel feature so netlink
interface may be changed/updated in the future. And this ZAPI extention
is something to support new routing paradigm, so it should be checked by
topotests until srv6 feature of linux kernel will be well stable.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoshaprd: install route supports nexthop-seg6local (step1)
Hiroki Shirokura [Sun, 6 Dec 2020 00:10:33 +0000 (09:10 +0900)]
shaprd: install route supports nexthop-seg6local (step1)

In this patch, we can install seg6local routes from shapd cli. New sub
command "sharp install route $PREFIX nexthop-seg6local" is added to
install seg6local routes via ZEBRA_ROUTE_ADD. This is for the behaviour
test(topotest) to ensure SRv6 ZAPI is working fine.

NEW-CLI:
sharp install routes 1::1 nexthop-seg6local dum0 End 1
sharp install routes 2::1 nexthop-seg6local dum0 End_X 2001::1 1
sharp install routes 3::1 nexthop-seg6local dum0 End_T 10 1
sharp install routes 4::1 nexthop-seg6local dum0 End_DX4 10.0.0.1 1

SRv6 routes are installed as NEXTHOP_IFINDEX routes because of seg6local
specification. seg6local routes depends the output device status instead
of routing-nexthop.

FYI:
In seg6local implementation, kernel don't care RTA_OIF on the nexthop
deeply but some requirement are exist as follow.
(a) DEV isn't loopback interface
(b) DEV's ipv6 status is enabled
(c) DEV's enslaving status is the same with target-route

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agosharpd: install_routes_helper support ZAPI_ROUTE flags (step1)
Hiroki Shirokura [Sun, 6 Dec 2020 08:13:19 +0000 (17:13 +0900)]
sharpd: install_routes_helper support ZAPI_ROUTE flags (step1)

current route addition mechanism on shaprd support only ipv4/v6 nexthop
routes simply. so It doesn't need to ensure flags of zapi_routes.

Then when we want to configure more complicated routing feature (like a
srv6), we will want to control flags of zapi_route. In this patch, it
will supports to configure flags of zapi_route when sharpd calls
ZEBRA_ROUTE_ADD.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: parse non-zebra seg6local configuration via netlink (step1)
Hiroki Shirokura [Fri, 18 Dec 2020 13:39:25 +0000 (22:39 +0900)]
zebra: parse non-zebra seg6local configuration via netlink (step1)

FRRouting operator can install seg6local route via ZAPI,
But linux kernel operator also can install seg6local route
via Netlink directry (i.e. iproute2)

This commit make zebra to parse non-frr seg6local
route configuration via netlink and audit Zebra's RIB.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agozebra: ZEBRA_ROUTE_ADD supports seg6local route (step1)
Hiroki Shirokura [Sat, 5 Dec 2020 23:01:39 +0000 (08:01 +0900)]
zebra: ZEBRA_ROUTE_ADD supports seg6local route (step1)

With this patch, zclient can intall seg6local rotues whem
they set properties nh_seg6local_{action,ctx} on struct nexthop
and set ZEBRA_FLAG_SEG6LOCAL_ROUTE on zapi_route's flag.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: add new nexthop's attributes seg6local (step1)
Hiroki Shirokura [Wed, 19 Aug 2020 00:46:33 +0000 (09:46 +0900)]
lib: add new nexthop's attributes seg6local (step1)

This commit is a part of #5853 works that add new nexthop's addional
object for SRv6 routing about seg6local route. Before this commit,
we can add MPLS info as additional object on nexthop.
This commit make it add more support about seg6local routes.

seg6local routes are ones of the LWT routing mechanism,
so configuration of seg6local routes is performed by
ZEBRA_ROUTE_SEND, it's same as MPLS configuration.

Real configuration implementation isn't implemented at this commit.
later commit add that. This commit add only nexthop additional object
and some misc functions.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agolib: refactor func prototype seg6local_context2str (step1)
Hiroki Shirokura [Wed, 19 Feb 2020 12:46:24 +0000 (21:46 +0900)]
lib: refactor func prototype seg6local_context2str (step1)

Make seg6local_context2str function's prototype better.
This function is added on commit e496b4203, and function
interface's considering wasn't enough.

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoMerge pull request #8759 from idryzhov/ospf6-vrf-fix
Donald Sharp [Tue, 1 Jun 2021 20:31:26 +0000 (16:31 -0400)]
Merge pull request #8759 from idryzhov/ospf6-vrf-fix

ospf6d: fix using vrf interface as a loopback

3 years agoMerge pull request #8761 from idryzhov/fix-isis-vrf
Donald Sharp [Tue, 1 Jun 2021 20:26:56 +0000 (16:26 -0400)]
Merge pull request #8761 from idryzhov/fix-isis-vrf

isisd: fix using vrf interface as a loopback

3 years agoMerge pull request #8765 from idryzhov/bfd-vrf
Rafael Zalamena [Tue, 1 Jun 2021 20:15:06 +0000 (17:15 -0300)]
Merge pull request #8765 from idryzhov/bfd-vrf

isisd, ospf6d, pimd: set vrf_id when creating bfd sessions

3 years agoMerge pull request #8353 from opensourcerouting/llvm-20210327
Quentin Young [Tue, 1 Jun 2021 19:08:32 +0000 (19:08 +0000)]
Merge pull request #8353 from opensourcerouting/llvm-20210327

3 years agoMerge pull request #8304 from mjstapp/fix_zmq_xref
Donald Sharp [Tue, 1 Jun 2021 17:59:51 +0000 (13:59 -0400)]
Merge pull request #8304 from mjstapp/fix_zmq_xref

lib: fix use of xrefs in zmq wrapper

3 years agoMerge pull request #8762 from idryzhov/pcep-coverity
Mark Stapp [Tue, 1 Jun 2021 17:27:49 +0000 (13:27 -0400)]
Merge pull request #8762 from idryzhov/pcep-coverity

pceplib: fix mixup of global/local variables

3 years agoMerge pull request #8748 from idryzhov/ospf6-vrf-unlink
Mark Stapp [Tue, 1 Jun 2021 16:06:08 +0000 (12:06 -0400)]
Merge pull request #8748 from idryzhov/ospf6-vrf-unlink

ospf6d: unlink router from vrf on deletion

3 years agoMerge pull request #8683 from kuldeepkash/bgp_gshut
Russ White [Tue, 1 Jun 2021 15:43:48 +0000 (11:43 -0400)]
Merge pull request #8683 from kuldeepkash/bgp_gshut

tests: Add bgp_gshut_topo1 test suite

3 years agoMerge pull request #8769 from ton31337/fix/time_to_remove
Igor Ryzhov [Tue, 1 Jun 2021 14:45:25 +0000 (17:45 +0300)]
Merge pull request #8769 from ton31337/fix/time_to_remove

lib: Time to remove CONFDATE block

3 years agolib: Time to remove CONFDATE block 8769/head
Donatas Abraitis [Tue, 1 Jun 2021 07:07:58 +0000 (10:07 +0300)]
lib: Time to remove CONFDATE block

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8698 from donaldsharp/pim_black_tests
Donatas Abraitis [Tue, 1 Jun 2021 06:41:04 +0000 (09:41 +0300)]
Merge pull request #8698 from donaldsharp/pim_black_tests

tests: Fixup some pylint warnings in test_multicast_pim_sm_topo2.py

3 years agoMerge pull request #8768 from idryzhov/doc-index
Rafael Zalamena [Mon, 31 May 2021 19:54:41 +0000 (16:54 -0300)]
Merge pull request #8768 from idryzhov/doc-index

doc: fix redundant index once again

3 years agodoc: fix redundant index once again 8768/head
Igor Ryzhov [Mon, 31 May 2021 15:29:34 +0000 (18:29 +0300)]
doc: fix redundant index once again

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd, ospf6d, pimd: set vrf_id when creating bfd sessions 8765/head
Igor Ryzhov [Mon, 31 May 2021 10:57:55 +0000 (13:57 +0300)]
isisd, ospf6d, pimd: set vrf_id when creating bfd sessions

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #6317 from rgirada/fix_route_dump
Rafael Zalamena [Fri, 28 May 2021 21:12:17 +0000 (18:12 -0300)]
Merge pull request #6317 from rgirada/fix_route_dump

zebrad: Added a command to dump routes in support bundle

3 years agoMerge pull request #8752 from pjdruddy/ospf6-route-mem-leak
Igor Ryzhov [Fri, 28 May 2021 17:43:07 +0000 (20:43 +0300)]
Merge pull request #8752 from pjdruddy/ospf6-route-mem-leak

ospf6: fix memory leak in ospf6_abr_examin_summary

3 years agopceplib: fix mixup of global/local variables 8762/head
Igor Ryzhov [Fri, 28 May 2021 17:39:37 +0000 (20:39 +0300)]
pceplib: fix mixup of global/local variables

CID 1502790

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix using vrf interface as a loopback 8761/head
Igor Ryzhov [Fri, 28 May 2021 15:45:40 +0000 (18:45 +0300)]
isisd: fix using vrf interface as a loopback

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix using vrf interface as a loopback 8759/head
Igor Ryzhov [Fri, 28 May 2021 13:14:34 +0000 (16:14 +0300)]
ospf6d: fix using vrf interface as a loopback

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8740 from mjstapp/fix_static_ret
Igor Ryzhov [Fri, 28 May 2021 08:35:43 +0000 (11:35 +0300)]
Merge pull request #8740 from mjstapp/fix_static_ret

staticd: return meaningful status in cli error path

3 years agoMerge pull request #8747 from LabNConsulting/chopps/improve-grpc-req-checks
David Lamparter [Thu, 27 May 2021 18:50:17 +0000 (20:50 +0200)]
Merge pull request #8747 from LabNConsulting/chopps/improve-grpc-req-checks

grpc: improve checks for GRPC C++ requirements

3 years agoMerge pull request #8174 from mjstapp/backup_nht
Stephen Worley [Thu, 27 May 2021 13:49:41 +0000 (09:49 -0400)]
Merge pull request #8174 from mjstapp/backup_nht

zebra: hide backup-nexthop activations in nht

3 years agoMerge pull request #8753 from idryzhov/fix-labn-ci
Lou Berger [Thu, 27 May 2021 13:45:52 +0000 (09:45 -0400)]
Merge pull request #8753 from idryzhov/fix-labn-ci

Fix LabN CI

3 years agostaticd: return SUCCESS when deleting non-existent route 8740/head
Mark Stapp [Wed, 26 May 2021 18:30:51 +0000 (14:30 -0400)]
staticd: return SUCCESS when deleting non-existent route

Return SUCCESS if trying to delete route that doesn't exist.
This was always staticd's behavior before the northbound
conversion.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodocker: fix ubuntu containers 8753/head
Igor Ryzhov [Thu, 27 May 2021 12:57:03 +0000 (15:57 +0300)]
docker: fix ubuntu containers

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoRevert "build: libyangv2 is mainlined, update"
Igor Ryzhov [Thu, 27 May 2021 12:56:06 +0000 (15:56 +0300)]
Revert "build: libyangv2 is mainlined, update"

This partially reverts commit 250335d47cc338fa1951494a9b78bf429016a7e5.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agogrpc: improve checks for GRPC C++ requirements 8747/head
Christian Hopps [Thu, 20 May 2021 06:46:34 +0000 (06:46 +0000)]
grpc: improve checks for GRPC C++ requirements

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoospf6: fix memory leak in ospf6_abr_examin_summary 8752/head
Pat Ruddy [Tue, 25 May 2021 08:38:26 +0000 (09:38 +0100)]
ospf6: fix memory leak in ospf6_abr_examin_summary

Ensure that if allocated route is not added to a table then it is
deleted to avoid leaking memory.
Add a new memory type for route table so that ospf6 routes can be
distinguished in the show memory output in isolation.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
3 years agoospf6d: unlink router from vrf on deletion 8748/head
Igor Ryzhov [Thu, 27 May 2021 10:16:40 +0000 (13:16 +0300)]
ospf6d: unlink router from vrf on deletion

Otherwise `ospf6_lookup_by_vrf_id` returns stale pointer.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8751 from LabNConsulting/chopps/ly2-mainline
Igor Ryzhov [Thu, 27 May 2021 11:34:26 +0000 (14:34 +0300)]
Merge pull request #8751 from LabNConsulting/chopps/ly2-mainline

build: libyangv2 is mainlined, update

3 years agoMerge pull request #8679 from louis-oui/bgp-summary-filter
Donatas Abraitis [Thu, 27 May 2021 10:57:14 +0000 (13:57 +0300)]
Merge pull request #8679 from louis-oui/bgp-summary-filter

bgpd: add show bgp summary filter by neighbor or AS

3 years agobuild: libyangv2 is mainlined, update 8751/head
Christian Hopps [Thu, 27 May 2021 10:28:01 +0000 (10:28 +0000)]
build: libyangv2 is mainlined, update

Signed-off-by: Christian Hopps <chopps@gmail.com>
3 years agoMerge pull request #8738 from gromit1811/bugfix_ospf6_set_tag
Igor Ryzhov [Thu, 27 May 2021 07:07:13 +0000 (10:07 +0300)]
Merge pull request #8738 from gromit1811/bugfix_ospf6_set_tag

ospf6d: Fix route map "set tag" command

3 years agoMerge pull request #8707 from LabNConsulting/chopps/improve-grpc-req-checks
Quentin Young [Wed, 26 May 2021 20:11:53 +0000 (20:11 +0000)]
Merge pull request #8707 from LabNConsulting/chopps/improve-grpc-req-checks

3 years agoMerge pull request #8736 from idryzhov/fix-ospf6-debug
Rafael Zalamena [Wed, 26 May 2021 18:25:08 +0000 (15:25 -0300)]
Merge pull request #8736 from idryzhov/fix-ospf6-debug

ospf6d: fix debug message issues

3 years agoMerge pull request #8732 from idryzhov/fix-ospf6d-crashes
Mark Stapp [Wed, 26 May 2021 15:32:33 +0000 (11:32 -0400)]
Merge pull request #8732 from idryzhov/fix-ospf6d-crashes

ospf6d: fix possible crashes

3 years agobgpd: add show bgp summary filter by neighbor or AS 8679/head
Louis Scalbert [Wed, 12 May 2021 15:17:56 +0000 (17:17 +0200)]
bgpd: add show bgp summary filter by neighbor or AS

Add ability to filter session on show bgp summary by neighbor or
remote AS:

ubuntu# show bgp summary ?
  neighbor     Show only the specified neighbor session
  remote-as    Show only the specified remote AS session
ubuntu# show bgp summary neighbor ?
  A.B.C.D   Neighbor to display information about
  WORD      Neighbor on BGP configured interface
  X:X::X:X  Neighbor to display information about
ubuntu# show bgp summary remote-as ?
  (1-4294967295)  AS number
  external        External (eBGP) AS sessions
  internal        Internal (iBGP) AS sessions

This patch includes the documentation and the topotest.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agoospf6d: Fix route map "set tag" command 8738/head
Martin Buck [Wed, 26 May 2021 14:03:51 +0000 (16:03 +0200)]
ospf6d: Fix route map "set tag" command

So far, "set tag" was 99% implemented in ospf6d, but registration of the
hook functions was missing, causing "set tag" actions in route maps to be
ignored in ospf6d.

This commit adds the missing hook registration.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 years agoMerge pull request #8730 from idryzhov/staticd-distance
Mark Stapp [Wed, 26 May 2021 11:40:35 +0000 (07:40 -0400)]
Merge pull request #8730 from idryzhov/staticd-distance

staticd: fix distance processing

3 years agoospf6d: fix debug message config write 8736/head
Igor Ryzhov [Wed, 26 May 2021 08:48:09 +0000 (11:48 +0300)]
ospf6d: fix debug message config write

Fix the following issues:
- if "send" is combined with "recv-hdr", only "send" is shown
- if "recv" is combined with "send-hdr", only "recv" is shown
- if both "send-hdr" and "recv-hdr" are enabled, "; header only" is shown

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospf6d: fix invalid "no debug ospf6 message unknown"
Igor Ryzhov [Wed, 26 May 2021 08:45:07 +0000 (11:45 +0300)]
ospf6d: fix invalid "no debug ospf6 message unknown"

The message is always shown in the config, because IS_OSPF6_DEBUG_MESSAGE
works incorrectly when negated because of missing outer brackets.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8726 from donaldsharp/possible_ospf_fix
Martin Winter [Wed, 26 May 2021 00:38:43 +0000 (02:38 +0200)]
Merge pull request #8726 from donaldsharp/possible_ospf_fix

ospfd: Fix quick interface down up event handling in ospf

3 years agoospf6d: fix possible crashes 8732/head
Igor Ryzhov [Tue, 25 May 2021 18:58:55 +0000 (21:58 +0300)]
ospf6d: fix possible crashes

OSPF6 instance may not exist when processing interface state change.
Do not execute processing steps that require an instance if an area is
not configured for an interface.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: Fix quick interface down up event handling in ospf 8726/head
Donald Sharp [Mon, 24 May 2021 17:45:29 +0000 (13:45 -0400)]
ospfd: Fix quick interface down up event handling in ospf

When we get this sequence of events:

- zebra receives interface up, sends to ospf
- ospf receives intf up, processes( including neighbor formation and spf )
  and sends route to zebra for installation.
- zebra receives route for processing, schedules it too happen in the future
- zebra receives interface down event, sends to ospf
- zebra processes route X and marks it inactive because nexthop
  interface is down
- zebra receives interface up event, sends to ospf
- ospf receives both events and processes the change and decides
  that nothing has changed so it does not send any route change for X to zebra.

At this point zebra has a route from ospf that is marked as inactive, while
ospf believes that the route should be installed properly.

Modify the code such that on an interface down event, ospf marks the routes
as changed if the ifindex is being used for a nexthop, so that when ospf
is deciding if routes have changed post spf that it can just automatically
send that route down again if it still exists.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>