Commit Graph

17715 Commits

Author SHA1 Message Date
Kuldeep Kashyap
468b867f4f tests: Add bgp route-map test cases
Adding 27 bgp route-map test cases to test multiple route-map scenarios

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
8aa6292547 tests: Add API to shut/noshut router interface
This API would help to shut/nohut specified router interfaces

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
21a51c4d0f tests: Adding verification APIs for bgp route-maps and community-lists
APIs to verify bgp route-maps, bgp community and large community configurations

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
380bb6d16b tests: Enhance support to create bgp community-list or large-community-list
Adding new API to create bgp community-list or large-community-list

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
89f86e8c7b tests: Enhance framework to create and delete route-map
Added APIs to create and delete route-maps configuration

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
9920237e4f tests: Add route-map to initial config creation from JSON
To enable route-map config build from JSON

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Kuldeep Kashyap
7f55cb6a88 tests: Adding API verify_bgp_attributes() to bgp.py
This API is to verify BGP attribute values set by route maps

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2019-09-26 10:06:16 +00:00
Donatas Abraitis
5300176ff8
Merge pull request #5047 from dslicenc/bgp-next-hop-routemap
bgpd: stop sending nexthop set by "route-map in" to eBGP peers
2019-09-26 11:17:51 +03:00
Don Slice
1c875ddb57 bgpd: stop sending nexthop set by "route-map in" to eBGP peers
Problem reported that when a "neighbor x.x.x.x route-map FOO in"
set a next-hop value, that modified next-hop value was also sent
to eBGP peers.  This is incorrect since bgp is expected to set
next-hop to self when sending to eBGP peers unless third party
next-hop on a shared segment is true.  This fix modifies the
behavior to stop sending the modified next-hop to eBGP peers
if the route-map was applied inbound on another peer.

Ticket: CM-26025
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2019-09-25 13:54:39 -07:00
Donald Sharp
7e933bc159
Merge pull request #5058 from mjstapp/fix_dplane_config_handler
zebra: handle config write for dataplane values
2019-09-25 16:47:47 -04:00
Donald Sharp
75a5d867a1
Merge pull request #5051 from idryzhov/fix-vrf-autocomplete
*: fix missing VRF autocompletions
2019-09-25 15:27:55 -04:00
Chirag Shah
8d0f01f10e zebra: fix evpn prefix-routes-only for default vrf
asymmetric routing default vrf vni configuration
is not displayed as part of running-config.

Ticket:CM-26470
Reviewed By:
Testing Done:

T11# config t
T11(config)# vni 4004 prefix-routes-only
T11(config)# end

Before:

T11# show running-config
...
vni 4004
...

After:

T11# show running-config
...
vni 4004 prefix-routes-only
...

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-09-25 12:11:09 -07:00
Mark Stapp
f26730e17e zebra: handle config write for dataplane values
Add the (single) dataplane config value to the output of
config write, 'show run' - missed this during dplane development.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-25 14:05:50 -04:00
Mark Stapp
8dd3950095
Merge pull request #5053 from donaldsharp/more_sa_stuff_this_evening
More sa stuff this evening
2019-09-25 11:23:49 -04:00
Mark Stapp
dd38ed3502
Merge pull request #5055 from pguibert6WIND/fix_memory_leak_with_delete_interface
zebra: fix memory leak
2019-09-25 10:03:26 -04:00
Donald Sharp
59aa96313a
Merge pull request #5052 from mjstapp/zebra_yang_model
libs: add yang models for zebra and nexthop
2019-09-25 09:27:57 -04:00
Donald Sharp
24cbd13098 pimd: up->channel_oil cannot be NULL
When we create the up data structure we create the channel_oil
as well.  As such it is impossible to get into this code
so it can be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-25 09:26:24 -04:00
Donald Sharp
38513e880e eigrpd: On creation of socket ensure vrf exists
If the vrf does not exist, politely do not create
the socket.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-25 09:26:24 -04:00
Donald Sharp
0f9f74baeb ospf6d: Prevent use after free
the for (ALL_LSDB...) macro was iterating over lsa,
when lsa had just been freed in these functions.
Remove the macro and make the adjustments saving lsa_next
before the free.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-25 09:26:24 -04:00
Donald Sharp
b53c5f1ab4 isisd: circuit is derefed in every code path
No need to check for circuit being null, we have
already de-refed it in every code path and
would have crashed before this point if it was.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-25 09:22:52 -04:00
Donatas Abraitis
8396ec6717
Merge pull request #5036 from indigo423/issue/5035
build: Fix Docker based Alpine build
2019-09-25 10:02:31 +03:00
Philippe Guibert
fc341a9791 zebra: fix memory leak
the if_lookup_by_name_per_ns keeps a lock on the node where the
searched ifp is stored. Then this node can not be freed even if
the ifp is removed from the node. Just add the missing unlock
(as for the if_lookup_by_index_per_ns lookup function)

Fixes: b8af3fbbaf ("zebra: fix detection of interface renames")
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-09-25 08:51:06 +02:00
Chirag Shah
2c4654a183 bgpd: fix global and per vni knobs display
Not just per vni knobs but when the global
knobs are enabled, display
per vni advertise-svi-ip and advertise-gw-macip
as active.

Ticket:CM-26381
Reviewed By:
Testing Done:

TOR1#show running-config bgpd
router bgp 5587
 ...
 address-family l2vpn evpn
  advertise-all-vni
  advertise-svi-ip
...

TORC11# show bgp l2vpn evpn vni 1004 json
{
  "vni":1004,
  "type":"L2",
  "kernelFlag":"Yes",
  "rd":"27.0.0.11:7",
  "originatorIp":"36.0.0.11",
  "mcastGroup":"0.0.0.0",
  "advertiseGatewayMacip":"Disabled",
  "advertiseSviMacip":"Active",
  "importRts":[
    "5546:1004"
  ],
  "exportRts":[
    "5546:1004"
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-09-24 14:25:38 -07:00
Chirag Shah
cbdbb1cafc bgpd: add advertise-svi-ip in json output
Ticket:CM-26404
Reviewed By:
Testing Done:

TORC1# show bgp l2vpn evpn vni 1004 json
{
  "vni":1004,
  "type":"L2",
  "kernelFlag":"Yes",
  "rd":"37.0.1.11:7",
  "originatorIp":"37.0.1.11",
  "mcastGroup":"0.0.0.0",
  "advertiseGatewayMacip":"No",
  "advertiseSviMacip":"No",
  "importRts":[
    "5546:1004"
  ],
  "exportRts":[
    "5546:1004"
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-09-24 14:25:38 -07:00
Mark Stapp
fdd5c6e855 libs: add yang models for zebra and nexthop
Add a yang model for some of zebra's functionality,
but the model is not integrated into the build at all yet. Also
add a model for nexthop and nexthop-group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-24 16:31:12 -04:00
Donald Sharp
0cddbb1b6c
Merge pull request #5050 from LabNConsulting/working/lb/tt-update
topotest: bgp_l3vpn_to_bgp_vrf allow for different interface output
2019-09-24 16:07:35 -04:00
Donald Sharp
17a8a5beec
Merge pull request #4972 from mjstapp/fix_notif_installed
zebra: route updates from dataplane need to check all nexthops
2019-09-24 14:31:58 -04:00
Donald Sharp
ad39295aaf
Merge pull request #5040 from opensourcerouting/isisd-fix-validation-crash
isisd: fix crash during candidate validation
2019-09-24 14:14:56 -04:00
Igor Ryzhov
e429a2a0cc *: fix missing VRF autocompletions
Current autocompletion works only for simple "vrf NAME" case.

This commit expands it also for the following cases:
- "nexthop-vrf NAME" in staticd
- usage of $varname in many daemons

All daemons are updated to use single varname "$vrf_name".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-09-24 19:51:46 +03:00
Russ White
8db933928f
Merge pull request #4959 from pguibert6WIND/zebra_inform_layer
zebra: inform upper layer error when reading correct speed interface
2019-09-24 11:46:13 -04:00
Russ White
a7f5a058e2
Merge pull request #4822 from vishaldhingra/route_agg
bgpd : route aggregation optimisation
2019-09-24 11:40:01 -04:00
Russ White
a56cb091fa
Merge pull request #5044 from chiragshah6/evpn_dev2
bgpd: fix advertise-svi-ip upon vni-svi up-down
2019-09-24 10:45:56 -04:00
Russ White
5ed07cdfc8
Merge pull request #5045 from satheeshkarra/pim_tos
pimd: Mark Default TOS Values for PIM & IGMP Outgoing packets
2019-09-24 10:44:01 -04:00
Russ White
e4bf00fdf9
Merge pull request #4995 from opensourcerouting/ospf6d-iftype
ospf6d: fix interface type handling
2019-09-24 10:38:10 -04:00
Donatas Abraitis
bdd0ce8aa5
Merge pull request #5046 from donaldsharp/sa_issues_found
Sa issues found
2019-09-24 17:22:46 +03:00
Donald Sharp
a3116965bb bgpd: rmap_type is 8 bit but we have 9 bits of flags
The newly added PEER_RMAP_TYPE_AGGREGATE flag is setup to
be the 9th bit:

But the flag we are putting it into:
uint8_t rmap_type;

is 8 bits.  Adjust the size.

Found by Coverity SA Scan
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-24 08:29:46 -04:00
Donald Sharp
4550d5df00 pbrd: We should be looking for v4 and v6 nexthop types
The code should be looking for both v4 and v6 nexthop types
instead of v4 nexthop types 2 times.

Found by Coverity SA
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-24 08:20:34 -04:00
Donald Sharp
d3fc71f304
Merge pull request #4912 from lucize/carescross
clippy: don't fail on CARES and libcap when clippy-only selected
2019-09-24 08:14:45 -04:00
Donald Sharp
e030e863b6
Merge pull request #5039 from opensourcerouting/isisd-yang-state-data
isisd: start implementing yang-modeled state data
2019-09-24 07:35:34 -04:00
vdhingra
ef51a7d8d4 bgpd : route agg. with aspath attribute is consuming lot of cycles.
While configuring aggregate route prepare the hash table first,
then prepare the aggregated aspath value just like lcomm,
ecomm and standard community.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
2019-09-24 02:54:19 -07:00
vdhingra
4edd83f91b bgpd : route agg. with ecomm attribute is consuming lot of cycles.
While configuring aggregate route prepare the hash table first,
then prepare the aggregated ecomm value and then do the
unique sort once for ecommunity.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
2019-09-24 02:54:19 -07:00
vdhingra
21fec67453 bgpd : route agg. with comm attr is consuming lot of cycles.
While configuring aggregate route prepare the hash table
first, then prepare the aggregated standard comm value
and then do the unique sort once for standard community.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
2019-09-24 02:54:19 -07:00
vdhingra
f1eb1f0526 bgpd : route agg. with lcomm attribute is consuming lot of cycles.
While configuring aggregate route prepare the hash table first,
then prepare the aggregated lcomm value and then do the unique
sort once for large community.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2019-09-24 02:53:51 -07:00
Quentin Young
d99d43bc4e
Merge pull request #5042 from opensourcerouting/vtysh-nb-cmds
vtysh: add two commands from the northbound
2019-09-24 05:11:00 -04:00
Satheesh Kumar K
d516749633 Zebra: ADD Protobuf Encoding & Decoding for MLAG Messages
1. add the Mlag ProtoBuf Lib to Zebra Compilation
2. Encode the messages with protobuf before writing to MLAG
3. Decode the MLAG Messages using protobuf and write to clients
   based on their subscrption.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-24 01:52:18 -07:00
Satheesh Kumar K
9918b45e63 lib,mlag : Defining MLAG Proto file
Defining the message structures between Zebra & MLAG

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-24 01:42:47 -07:00
Satheesh Kumar K
40d9d1cc44 Zebra: adding support for Zebra MLAG Functionality
This includes:
1. Processing client Registrations for MLAG
2. storing client Interests for MLAG updates
3. Opening communication channel to MLAG  with First client reg
4. Closing Communication channel with last client De-reg
5. Spawning a new thread for handling MLAG updates peocessing
6. adding Test code
7. advertising MLAG Updates to clients based on their interests

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-24 01:42:31 -07:00
Satheesh Kumar K
5fdca4ded5 pimd, lib: adding support for MLAG Message processing at PIM
This includes:
1. Defining message formats
2. Stream Decoding after receiving the message at PIM
3. Handling MLAG UP & Down Notifications

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-24 01:35:09 -07:00
Donatas Abraitis
ac4088a5e2
Merge pull request #5043 from donaldsharp/update_groups_and_coalesce_timer
Update groups and coalesce timer
2019-09-24 10:07:40 +03:00
Satheesh Kumar K
9036d0ef1a pimd: Mark Default TOS Values for PIM & IGMP Outgoing packets
This will facilitate the Hardware to prefer control packets over
Normal Data packets while queuing, so that during congestion, the
chance of dropping control packet will be minimised.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-23 23:03:12 -07:00