Rafael Zalamena
98a8750481
zebra: gracefully shutdown fpm module
...
Lets stop and free all resources before shutting down.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-17 20:18:58 -03:00
Rafael Zalamena
6ba8db2186
zebra: notify data plane providers about shutdown
...
Call the `dp_fini` callback twice: once at the beginning of the shutdown
and then again right before `exit()`ing zebra.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-17 20:18:58 -03:00
Rafael Zalamena
9d73613388
doc: update FPM documentation
...
Tell users about new FPM implementation and add more documentation about
it.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-04-17 20:18:54 -03:00
Mark Stapp
193848fff6
lib: clear data pointer in bf_free
...
Help avoid double-free by clearing data pointer.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-17 16:53:37 -04:00
Donatas Abraitis
4110aa2cb3
Merge pull request #6248 from donaldsharp/zebra_snmp
...
some more coverity fixups
2020-04-17 12:09:58 +03:00
Sri Mohana Singamsetty
bece779c79
Merge pull request #6240 from ton31337/fix/null_bnc_bgp_show_hostname
...
bgpd: Add a sanitify check for bgp_nexthop_cache against NULL
2020-04-16 20:17:40 -07:00
Donald Sharp
85948e7bfa
pimd: if_lookup_by_index can fail handle it appropriately
...
It is possible that a if_lookup_by_index can return NULL
ensure that we handle this appropriately.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-16 20:28:15 -04:00
Donald Sharp
50cf5243c1
lib: prefix must be a valid pointer at this point
...
Coverity does not understand how our CLI works. Make it
happy that we have tested it's existence
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-16 20:17:22 -04:00
Donald Sharp
b2145a4004
ospfd: Fix possible null deref
...
It is possible that area is null, let's ensure it isn't.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-16 20:16:02 -04:00
Donald Sharp
17e2f0bff3
zebra: in_addr_cmp and struct prefix
are not happy
...
Coverity is complaining that we are looking beyond the end
of the pointer. Why not just use prefix_cmp here? Since
we are comparing to route_nodes.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-16 20:14:55 -04:00
Donald Sharp
a83014ccd6
Merge pull request #6247 from FRRouting/nb_conversions
...
Merge nb_converions branch to master
2020-04-16 19:39:14 -04:00
Donald Sharp
2ff99507ad
Merge pull request #6135 from opensourcerouting/cli-node-cleanup
...
*: clean up the mess that is CLI command nodes
2020-04-16 19:24:56 -04:00
Quentin Young
edf7eff077
Merge pull request #6239 from ton31337/fix/uint8_t_to_bool_for_any
...
bgpd, lib: Use bool instead of uint8_t for community/prefix-list "any"
2020-04-16 15:40:03 -04:00
Quentin Young
40664f16e3
lib: suppress formatting on yang.c module array
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-16 15:38:11 -04:00
Donatas Abraitis
45facd9c66
Merge pull request #5913 from taspelund/evpn_route_type_int
...
bgpd: Allow 'show bgp l2vpn evpn route type' to use RT number in addition to existing keywords
2020-04-16 22:28:19 +03:00
Olivier Dugeon
c2c3db58a4
Merge pull request #6224 from mjstapp/zclient_session_id
...
lib,zebra: add a session id for zapi sessions
2020-04-16 21:12:30 +02:00
Quentin Young
bec74cc8a3
lib: fix style nit in yang_wrappers.c
...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-04-16 15:10:19 -04:00
Mark Stapp
4cebdb9bb8
zebra,ldpd: use zapi client session id in LM apis
...
Use the zapi client session id in the label manager apis;
use the client struct directly in some code. Assign a session
id to ldpd's sync LM zapi session.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-16 12:07:54 -04:00
Mark Stapp
4e0b5b31b7
lib,zebra: add a session id for zapi sessions
...
Distinguish zapi sessions, for daemons who use more than one,
by adding a session id. The tuple of proto + instance is not
adequate to support clients who use multiple zapi sessions.
Include the id in the client show output if it's present. Add
a bit of info about this to the developer doc.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-16 12:07:54 -04:00
Chirag Shah
7225e61cca
zebra: add weight to nb conversion
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:58:09 -07:00
Chirag Shah
d9d6232fb6
yang: add weight in nexthop operational model
...
add weight field to operational model.
add leafref to nexthopgroup.
format according to yanglint.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:51:41 -07:00
Chirag Shah
8f86689091
lib: increase xpath maxlen
...
Certain xpath are well 256 characters, increasing
to 512.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:51:41 -07:00
Chirag Shah
09268680bb
zebra: add northbound support for zebra interface
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:51:38 -07:00
Stephen Worley
887a232c3b
tests: add connected/recursive/duplicte/route-map NHG tests
...
Add some more NHG topotests using connected, recursive, duplicate
and higher ecmp nexthops as well as route maps.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2020-04-16 11:49:50 -04:00
Chirag Shah
83ed00f1df
lib: remove gcc 4.x workaround for nb structure
...
Remove gcc 4.x workaround for variable size array as gcc
check moved to header file.
In lib/northbound.h : struct frr_yang_module_info made
size 1000 for gcc 4.x, where maximum 1000 nodes can fit.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:48:57 -07:00
Chirag Shah
b00f3e4be4
zebra: add nb callbacks for zebra if state
...
This is all stub callbacks autogenrated for
zebra interface state data.
Signed-off-by: chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:48:28 -07:00
Chirag Shah
4e0a7355c2
lib: add interface operational northbound callback
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Chirag Shah
93a6af756c
yang: update zebra interface model
...
Modify interface config model
and add zebra specific interface state operational data.
augment /frr-interface:lib/frr-interface:interface:
+--rw zebra
+--rw ip-addrs* [address-family ip-prefix]
| +--rw address-family identityref
| +--rw ip-prefix ietf-inet-types:ip-prefix
| +--rw label? string
| +--rw ip4-peer? ietf-inet-types:ipv4-prefix
+--rw multicast? boolean
+--rw link-detect? boolean
+--rw shutdown? boolean
+--rw bandwidth? uint32
+--ro state
+--ro up-count? uint16
+--ro down-count? uint16
+--ro zif-type? identityref
+--ro ptm-status? string <disabled>
+--ro vlan-id? uint16
+--ro vni-id? vni-id-type
+--ro remote-vtep? ietf-inet-types:ipv4-address
+--ro mcast-group? ietf-routing-types:ipv4-multicast-group-address
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Chirag Shah
219dabe8d4
yang: add operational data to frr-interface model
...
module: frr-interface
+--rw lib
+--rw interface* [name vrf]
+--rw name string
+--rw vrf frr-vrf:vrf-ref
+--rw description? string
+--ro state
+--ro if-index? int32
+--ro mtu? uint16
+--ro mtu6? uint32
+--ro speed? uint32
+--ro metric? uint32
+--ro flags? if-flags-type
+--ro type? identityref
+--ro phy-address? ietf-yang-types:mac-address
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Chirag Shah
b0f502c521
yang: add ietf interface yang model
...
Add ietf interface yant model.
Also include it in the makefile.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Sarita Patra
7fd139b523
yang: igmp yang definition
...
Defined frr-igmp.yang file for IGMP protocol.
Co-authored-by: Sarita Patra <saritap@vmware.com>
Co-authored-by: Santosh P K <sapk@vmware.com>
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-04-16 08:26:29 -07:00
Chirag Shah
cad46cfdc9
lib: yang wrapper nexthop type to str
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:24:02 -07:00
Chirag Shah
b71df6891c
lib: add yang wrapper for type empty
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:18:00 -07:00
Chirag Shah
ed5abdb2ad
zebra: stub changes to assimilate re into rib nb
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:18:00 -07:00
Chirag Shah
303cfba626
yang: zebra rib model add route entry
...
FRR rib model need to accomodate route entries for
a given destination prefix.
Add a list of route entry under the list of prefix.
+--rw ribs
+--rw rib* [afi-safi-name table-id]
+--rw table-id uint32
+--rw afi-safi-name identityref
+--ro route* [prefix]
+--ro prefix ietf-inet-types:ip-prefix
+--ro route-entry* [protocol]
+--ro protocol frr-route-types:frr-route-types-v4
+--ro instance? uint16
+--ro distance? uint8
+--ro metric? uint32
+--ro tag? uint32
+--ro selected? empty
+--ro installed? empty
+--ro failed? empty
+--ro queued? empty
+--ro internal-flags? int32
+--ro internal-status? int32
+--ro uptime? ietf-yang-types:date-and-time
+--ro nexthop-group* [name]
+--ro name string
+--ro frr-nexthops
+--ro nexthop* [nh-type gateway interface]
+--ro nh-type frr-nexthop:nexthop-type
+--ro vrf? frr-vrf:vrf-ref
+--ro gateway frr-nexthop:optional-ip-address
+--ro interface frr-interface:interface-ref
+--ro bh-type? frr-nexthop:blackhole-type
+--ro onlink? boolean <false>
+--ro mpls-label-stack
| +--ro entry* [id]
| +--ro id uint8
| +--ro label? ietf-routing-types:mpls-label
| +--ro ttl? uint8
| +--ro traffic-class? uint8
+--ro duplicate? empty
+--ro recursive? empty
+--ro active? empty
+--ro fib? empty
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:59 -07:00
Chirag Shah
1fca062a25
yang: zebra rib model remove grouping for ip route
...
Grouping is referencing leaves outside the grouping
from where it is used. Removing it and defining leaves
at the used place.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:59 -07:00
Chirag Shah
d36228c956
zebra: convert clear evpn dup addr command to nb
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:59 -07:00
Chirag Shah
c37c6fd818
zebra: nb rpc cb for clear evpn dup addr cmd
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:57 -07:00
Chirag Shah
e20755b23e
zebra: clear dup detect cleanup for nb conversion
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:13:15 -07:00
Chirag Shah
dd9ef518bf
lib:api to convert mac to yang object
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:13:15 -07:00
Chirag Shah
ce45ffe73b
zebra: nb callbacks support
...
Definition of the northbound callbacks
and associated YANG data paths for zebra.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:13:12 -07:00
Chirag Shah
0d2e2bd138
yang: add zebra model in makefile
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:11:51 -07:00
Chirag Shah
e7ecd0a657
*: frr nexthop yang in makefile
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:09:11 -07:00
Chirag Shah
4218384d6f
yang: zebra rib operational model
...
augment /frr-vrf:lib/frr-vrf:vrf:
+--rw ribs
+--rw rib* [afi-safi-name table-id]
+--rw table-id uint32
+--rw afi-safi-name identityref
+--ro route* [prefix]
+--ro prefix ietf-inet-types:ip-prefix
+--ro protocol? frr-route-types:frr-route-types-v4
+--ro protocol-v6? frr-route-types:frr-route-types-v6
+--ro vrf? frr-vrf:vrf-ref
+--ro distance? uint8
+--ro metric? uint32
+--ro tag? uint32
+--ro selected? empty
+--ro installed? empty
+--ro failed? empty
+--ro queued? empty
+--ro internal-flags? int32
+--ro internal-status? int32
+--ro uptime? ietf-yang-types:date-and-time
+--ro nexthop-group* [name]
+--ro name string
+--ro frr-nexthops
+--ro nexthop* [nh-type gateway interface]
+--ro nh-type frr-nexthop:nexthop-type
+--ro vrf? frr-vrf:vrf-ref
+--ro gateway frr-nexthop:optional-ip-address
+--ro interface frr-interface:interface-ref
+--ro bh-type? frr-nexthop:blackhole-type
+--ro onlink? boolean <false>
+--ro mpls-label-stack
| +--ro entry* [id]
| +--ro id uint8
| +--ro label? ietf-routing-types:mpls-label
| +--ro ttl? uint8
| +--ro traffic-class? uint8
+--ro duplicate? empty
+--ro recursive? empty
+--ro active? empty
+--ro fib? empty
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:05:04 -07:00
Chirag Shah
115232e252
yang: revert leafref to get interface cmd working
...
Unable to access interface command:
root@bharat:~/stash/libyang/build# dpkg-query -W | grep libyang
libyang-dev 0.16.105-3~ubuntu18.04.1
libyang0.16 0.16.105-3~ubuntu18.04.1
root@bharat:~/stash/libyang/build# vtysh
bharat# config t
bharat(config)# interface lo
% Configuration failed: validation error.
Please check the logs for more details.
Logfile:
2020/03/21 16:48:55 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='lo'][vrf='default']/vrf)
2020/03/21 16:48:55 ZEBRA: [EC 100663337]
nb_candidate_commit_prepare: failed to validate
candidate configuration
CI system failure:
2020/03/21 18:53:18 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='r1-eth0'][vrf='default']/vrf)
2020/03/21 18:53:18 ZEBRA: [EC 100663337] nb_candidate_commit_prepare:
failed to validate candidate configuration
2020/03/21 18:53:18 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='r1-eth1'][vrf='default']/vrf)
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:00:18 -07:00
Chirag Shah
8b4cb7a64b
lib: convert vrf cmd to northbound config callback
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:00:18 -07:00
Chirag Shah
6fd8972aef
*: include vrf northbound module in init
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:00:15 -07:00
Chirag Shah
bc867a5d30
lib: vrf northbound callbacks
...
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 07:55:56 -07:00
vdhingra
8b04316627
lib: yang defination for basic frr-routing
...
Yang files for basic frr-routing used by other
daemons like staticd and pim
Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-04-16 07:55:53 -07:00
Santosh P K
09133ff4f7
Merge pull request #5451 from opensourcerouting/rcu-log
...
logging subsystem rewrite
2020-04-16 20:23:44 +05:30