]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agodoc: correct ip prefix token mapping table 5826/head
Mark Stapp [Tue, 18 Feb 2020 19:08:21 +0000 (14:08 -0500)]
doc: correct ip prefix token mapping table

Fix the table that shows the mapping between ip network cli
tokens and the data struct that the cli handler will see.
Optional network/subnet types appear as a pointer to an
all-zeroes struct, not a NULL pointer.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5813 from mjstapp/zapi_labels_use_nh
Donald Sharp [Tue, 18 Feb 2020 14:57:22 +0000 (09:57 -0500)]
Merge pull request #5813 from mjstapp/zapi_labels_use_nh

*: encode zapi labels message using nexthops

5 years agoMerge pull request #5801 from donaldsharp/bgp_peer_sort
Sri Mohana Singamsetty [Tue, 18 Feb 2020 05:39:37 +0000 (21:39 -0800)]
Merge pull request #5801 from donaldsharp/bgp_peer_sort

Bgp peer sort

5 years agoMerge pull request #5790 from chiragshah6/mdev
Sri Mohana Singamsetty [Tue, 18 Feb 2020 05:39:16 +0000 (21:39 -0800)]
Merge pull request #5790 from chiragshah6/mdev

bgpd: format fields to bgp evpn vni json cmds

5 years agoMerge pull request #5807 from ton31337/fix/do_not_show_failed_if_shutdown
Donald Sharp [Mon, 17 Feb 2020 14:29:28 +0000 (09:29 -0500)]
Merge pull request #5807 from ton31337/fix/do_not_show_failed_if_shutdown

bgpd: Show the real reason why the peer is failed

5 years agoMerge pull request #5815 from donaldsharp/feb_sa_stuff
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:41:55 +0000 (23:41 -0600)]
Merge pull request #5815 from donaldsharp/feb_sa_stuff

bgpd: Fix up a couple of new SA issues found

5 years agoMerge pull request #5817 from donaldsharp/more_bgp_rcvd_sent
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:40:31 +0000 (23:40 -0600)]
Merge pull request #5817 from donaldsharp/more_bgp_rcvd_sent

bgpd: Add a couple more spaces for output on MsgRcvd and MsgSent

5 years agoMerge pull request #5820 from donaldsharp/pcreposix
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:39:03 +0000 (23:39 -0600)]
Merge pull request #5820 from donaldsharp/pcreposix

lib: Fix so that `--enable-pcreposix` actually compiles

5 years agoMerge pull request #5821 from donaldsharp/configure_fixup
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:31:53 +0000 (23:31 -0600)]
Merge pull request #5821 from donaldsharp/configure_fixup

Configure fixup

5 years agobgpd: Add a couple more spaces for output on MsgRcvd and MsgSent 5817/head
Donald Sharp [Sat, 15 Feb 2020 20:38:48 +0000 (15:38 -0500)]
bgpd: Add a couple more spaces for output on MsgRcvd and MsgSent

annie# show bgp ipv4 uni summ
BGP router identifier 192.168.201.136, local AS number 64539 vrf-id 0
BGP table version 22458946
RIB entries 1458006, using 178 MiB of memory
Peers 4, using 68 KiB of memory

Neighbor               V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
45.33.5.119            4          0       0       0        0    0    0    never       Active
65.19.134.122          4      15096 4611832  108292        0    0    0 6d22h55m       800670
107.13.46.23           4          0       0       0        0    0    0    never      Connect
robot(192.168.201.139) 4      64540 11159975 11365599        0    0    0 05w2d05h      Connect

Total number of neighbors 4

On very busy systems The column output for MsgRcvd and MsgSent can quickly move past 7 columns.
Add a couple more to allow for even display.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Update configure options in installation notes 5821/head
Donald Sharp [Sun, 16 Feb 2020 19:57:39 +0000 (14:57 -0500)]
doc: Update configure options in installation notes

Add some missing configuration options in the installation notes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoconfigure: Fixup `--disable-irdp` option to reflect reality
Donald Sharp [Sun, 16 Feb 2020 19:39:49 +0000 (14:39 -0500)]
configure: Fixup `--disable-irdp` option to reflect reality

The help text was not properly setup for `--disable-irdp` fix
it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5814 from Jafaral/nhrp-no
Donald Sharp [Sun, 16 Feb 2020 19:15:42 +0000 (14:15 -0500)]
Merge pull request #5814 from Jafaral/nhrp-no

nhrpd: allow no nhrp map cmd to match the configured cmd

5 years agolib: Fix so that `--enable-pcreposix` actually compiles 5820/head
Donald Sharp [Sun, 16 Feb 2020 19:14:04 +0000 (14:14 -0500)]
lib: Fix so that `--enable-pcreposix` actually compiles

The `--enable-pcreposix` configure option was not actually compiling
properly.  Follow pre-existing pattern for inclusion of regex.h
or the pcreposix.h header.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Show the real reason why the peer is failed 5807/head
Donatas Abraitis [Fri, 14 Feb 2020 21:21:55 +0000 (23:21 +0200)]
bgpd: Show the real reason why the peer is failed

If the peer was shutdown locally, it doesn't show up as admin. shutdown.
Instead it's treated as "Waiting for peer OPEN".

The same applies to when the peer reaches maximum-prefix count.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years ago*: encode zapi labels message using nexthops 5813/head
Mark Stapp [Thu, 13 Feb 2020 21:47:41 +0000 (16:47 -0500)]
*: encode zapi labels message using nexthops

Use the zapi_nexthop struct with the mpls_labels
zapi messages instead of the special-purpose (and
more limited) nexthop struct that was being used.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agobgpd: Use the enum properly in a switch for rpki commands 5815/head
Donald Sharp [Fri, 14 Feb 2020 20:32:40 +0000 (15:32 -0500)]
bgpd: Use the enum properly in a switch for rpki commands

During route-map processing we return an enum, the rpki
code was doing some extra gyrations that were unnecessary.
Simplify.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Ensure we don't crash when registering RA's
Donald Sharp [Fri, 14 Feb 2020 20:15:26 +0000 (15:15 -0500)]
bgpd: Ensure we don't crash when registering RA's

There exists a code path that the ifp can be NULL.
Prevent an accident.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5811 from dslicenc/ipv6_ra_prefixes
Mark Stapp [Fri, 14 Feb 2020 19:44:55 +0000 (14:44 -0500)]
Merge pull request #5811 from dslicenc/ipv6_ra_prefixes

zebra: add all ipv6 global addresses to RA messages

5 years agonhrpd: allow no nhrp map cmd to match the configured cmd 5814/head
Jafar Al-Gharaibeh [Fri, 14 Feb 2020 17:49:58 +0000 (11:49 -0600)]
nhrpd: allow no nhrp map cmd to match the configured cmd

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
5 years agozebra: add all ipv6 global addresses to RA messages 5811/head
Don Slice [Mon, 10 Feb 2020 18:58:41 +0000 (18:58 +0000)]
zebra: add all ipv6 global addresses to RA messages

RFC 4861 states that ipv6 RA messages sent out an interface should
contain all global ipv6 addresses on that interface. This fix adds
that capability.  To override the default flags and timer settings
for a particular prefix, the existing "ipv6 nd prefix ..." command
should be used via vtysh under the appropriate interface.

Ticket: CM-20363
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #5810 from donaldsharp/fix_yang_routemap
Donatas Abraitis [Fri, 14 Feb 2020 11:41:03 +0000 (13:41 +0200)]
Merge pull request #5810 from donaldsharp/fix_yang_routemap

Fix yang routemap

5 years agosharpd: Add missing yang route-map callbacks 5810/head
Donald Sharp [Fri, 14 Feb 2020 05:53:43 +0000 (00:53 -0500)]
sharpd: Add missing yang route-map callbacks

sharpd was missing the yang route-map callbacks.
Add it in so it doesn't crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add missing yang callbacks for route-maps
Donald Sharp [Fri, 14 Feb 2020 05:53:01 +0000 (00:53 -0500)]
pimd: Add missing yang callbacks for route-maps

Pim was missing the yang callbacks for route-maps, causing
it to crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5806 from ton31337/fix/remove_break_after_return
Mark Stapp [Thu, 13 Feb 2020 16:32:27 +0000 (11:32 -0500)]
Merge pull request #5806 from ton31337/fix/remove_break_after_return

*: Remove break after return

5 years agoMerge pull request #5805 from donaldsharp/babel_int_return
Mark Stapp [Thu, 13 Feb 2020 16:32:06 +0000 (11:32 -0500)]
Merge pull request #5805 from donaldsharp/babel_int_return

babeld: GCC complaining about no return in non-void function

5 years agoMerge pull request #5787 from karamalla0406/rmac_check
Donatas Abraitis [Thu, 13 Feb 2020 15:50:16 +0000 (17:50 +0200)]
Merge pull request #5787 from karamalla0406/rmac_check

bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI

5 years agobabeld: GCC complaining about no return in non-void function 5805/head
Donald Sharp [Thu, 13 Feb 2020 13:44:40 +0000 (08:44 -0500)]
babeld: GCC complaining about no return in non-void function

The babel_main_loop function did not have a return for
a non-void function.  For some reason gcc is starting to complain
about this now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years ago*: Remove break after return 5806/head
Donatas Abraitis [Thu, 13 Feb 2020 13:21:26 +0000 (15:21 +0200)]
*: Remove break after return

Just a deadcode.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5798 from donaldsharp/bgp_packet_reformat
Sri Mohana Singamsetty [Thu, 13 Feb 2020 00:25:49 +0000 (16:25 -0800)]
Merge pull request #5798 from donaldsharp/bgp_packet_reformat

bgpd: Reformat bpacket_reformat_for_peer

5 years agobgpd: Further peer_sort refinements 5801/head
Donald Sharp [Wed, 12 Feb 2020 19:41:11 +0000 (14:41 -0500)]
bgpd: Further peer_sort refinements

Track the returned peer_sorted value and use it where
we can and recalculate where necessary.

This is an effort to reduce the amount of work done here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Create peer_sort_lookup()
Donald Sharp [Wed, 12 Feb 2020 18:26:19 +0000 (13:26 -0500)]
bgpd: Create peer_sort_lookup()

The act of peer_sort() being called always set this value
even when we are just looking it up.  We need to seperate
out the idea of lookup from set.

For those places that this is immediately obvious that
this is a lookup switch over to using this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Reformat bpacket_reformat_for_peer 5798/head
Donald Sharp [Tue, 11 Feb 2020 03:03:02 +0000 (22:03 -0500)]
bgpd: Reformat bpacket_reformat_for_peer

This function was heavily indented, reformat to reduce indentation
levels a bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5794 from mjstapp/remove_nexthop_matched_flag
Quentin Young [Wed, 12 Feb 2020 16:29:22 +0000 (11:29 -0500)]
Merge pull request #5794 from mjstapp/remove_nexthop_matched_flag

lib,zebra: remove unused MATCHED nexthop flag

5 years agolib,zebra: remove unused MATCHED nexthop flag 5794/head
Mark Stapp [Tue, 11 Feb 2020 16:14:37 +0000 (11:14 -0500)]
lib,zebra: remove unused MATCHED nexthop flag

Remove an unused flag value from the nexthop struct.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agobgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI 5787/head
Kishore Aramalla [Mon, 10 Feb 2020 19:38:27 +0000 (11:38 -0800)]
bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI

A route where ESI, GW IP, MAC and Label are all zero at the same time SHOULD
be treat-as-withdraw.
Invalid MAC addresses are broadcast or multicast MAC addresses. The route
MUST be treat-as-withdraw in case of an invalid MAC address.

As FRR support Ethernet NVO Tunnels only.
Route will be withdrawn when ESI, GW IP and MAC are zero or Invalid MAC

Test cases:
1) ET-5 route with valid RMAC extended community
2) ET-5 route no RMAC extended community
3) ET-5 route with Multicast MAC in RMAC extended community
4) ET-5 route with Broadcast MAC in RMAC extended community

Signed-off-by: Kishore Aramalla <karamalla@vmware.com>
5 years agoMerge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
Quentin Young [Tue, 11 Feb 2020 19:45:40 +0000 (14:45 -0500)]
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed

bgpd: Format properly `show bgp summary failed`

5 years agobgpd: change evpn vni json field format 5790/head
Chirag Shah [Tue, 11 Feb 2020 19:35:53 +0000 (11:35 -0800)]
bgpd: change evpn vni json field format

Change advertiseSviMacip to advertiseSviMacIp in
json output.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: readjust fields in evpn vni json cmd
Chirag Shah [Tue, 11 Feb 2020 00:50:19 +0000 (16:50 -0800)]
bgpd: readjust fields in evpn vni json cmd

1) Keep consistant field name, such as
"inKernel".
2) Keep fields order same for both outputs.

Testing Done:

TORS1# show bgp l2vpn evpn vni json
{
  "advertiseGatewayMacip":"Disabled",
  "advertiseSviMacip":"Disabled",
  "advertiseAllVnis":"Enabled",
  "flooding":"Head-end replication",
  "numVnis":8,
  "numL2Vnis":5,
  "numL3Vnis":3,
  "1002":{
    "vni":1002,
    "type":"L2",
    "inKernel":"True",
    "rd":"27.0.0.15:8",
    "originatorIp":"27.0.0.15",
    "mcastGroup":"0.0.0.0",
    "advertiseGatewayMacip":"Disabled",
    "advertiseSviMacip":"Disabled",
    "importRTs":[
      "5550:1002"
    ],
    "exportRTs":[
      "5550:1002"
    ]
  },
}

TORS1# show bgp l2vpn evpn vni 1002 json
{
  "vni":1002,
  "type":"L2",
  "inKernel":"True",
  "rd":"27.0.0.15:8",
  "originatorIp":"27.0.0.15",
  "mcastGroup":"0.0.0.0",
  "advertiseGatewayMacip":"Disabled",
  "advertiseSviMacip":"Disabled",
  "importRts":[
    "5550:1002"
  ],
  "exportRts":[
    "5550:1002"
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: add fields to bgp evpn vni json cmd
Chirag Shah [Mon, 10 Feb 2020 23:34:54 +0000 (15:34 -0800)]
bgpd: add fields to bgp evpn vni json cmd

Bring 'show bgp l2vpn evpn vni json' inline
with 'show bgp l2vpn evpn vni <id> json' in
terms of fields.

Ticket:CM-28328
Reviewed By:
Testing Done:

TORS1# show bgp l2vpn evpn vni json
{
  "advertiseGatewayMacip":"Disabled",
  "advertiseSviMacip":"Disabled",
  "advertiseAllVnis":"Enabled",
  "flooding":"Head-end replication",
  "numVnis":8,
  "numL2Vnis":5,
  "numL3Vnis":3,
  "1002":{
    "vni":1002,
    "type":"L2",
    "inKernel":"True",
    "originatorIp":"27.0.0.15",
    "rd":"27.0.0.15:8",
    "mcastGroup":"0.0.0.0",
    "advertiseGatewayMacip":"Disabled",
    "advertiseSviMacip":"Disabled",
    "importRTs":[
      "5550:1002"
    ],
    "exportRTs":[
      "5550:1002"
    ]
  },
}

TORS1# show bgp l2vpn evpn vni 1002 json
{
  "vni":1002,
  "type":"L2",
  "kernelFlag":"Yes",
  "rd":"27.0.0.15:8",
  "originatorIp":"27.0.0.15",
  "mcastGroup":"0.0.0.0",
  "advertiseGatewayMacip":"Disabled",
  "advertiseSviMacip":"Disabled",
  "importRts":[
    "5550:1002"
  ],
  "exportRts":[
    "5550:1002"
  ]
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #5778 from ton31337/fix/add_doc_for_ebgp_connected_route_check
Quentin Young [Tue, 11 Feb 2020 16:29:04 +0000 (11:29 -0500)]
Merge pull request #5778 from ton31337/fix/add_doc_for_ebgp_connected_route_check

doc: Add few words about `bgp disable-ebgp-connected-route-check`

5 years agobgpd: Format properly `show bgp summary failed` 5793/head
Donatas Abraitis [Tue, 11 Feb 2020 16:02:19 +0000 (18:02 +0200)]
bgpd: Format properly `show bgp summary failed`

Before:
```
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.0.1           0       0    never  Waiting for peer OPEN
```

After:
```
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.0.1           0       0     never Waiting for peer OPEN
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5785 from ton31337/fix/replace_gtsm_hops_to_readable_macros
Russ White [Tue, 11 Feb 2020 15:40:35 +0000 (10:40 -0500)]
Merge pull request #5785 from ton31337/fix/replace_gtsm_hops_to_readable_macros

bgpd: Use readable macros for peer->gtsm_hops instead of literals

5 years agoMerge pull request #5744 from ton31337/fix/thread-as-withdraw_attributes
Russ White [Tue, 11 Feb 2020 15:04:19 +0000 (10:04 -0500)]
Merge pull request #5744 from ton31337/fix/thread-as-withdraw_attributes

bgpd: Update some attributes how they are handled if malformed

5 years agoMerge pull request #5789 from donaldsharp/bgp_ebgp_reason
Donatas Abraitis [Tue, 11 Feb 2020 08:42:23 +0000 (10:42 +0200)]
Merge pull request #5789 from donaldsharp/bgp_ebgp_reason

bgpd: Update failed reason to distinguish some NHT scenarios

5 years agobgpd: Update failed reason to distinguish some NHT scenarios 5789/head
Donald Sharp [Tue, 11 Feb 2020 00:25:52 +0000 (19:25 -0500)]
bgpd: Update failed reason to distinguish some NHT scenarios

Current failed reasons for bgp when you have a peer that
is not online yet is `Waiting for NHT`, even if NHT has
succeeded.  Add some code to differentiate this.

eva# show bgp ipv4 uni summ failed
BGP router identifier 192.168.201.135, local AS number 3923 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 2, using 43 KiB of memory
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.44.1          0       0    never  Waiting for NHT
192.168.201.139       0       0    never  Waiting for Open to Succeed
Total number of neighbors 2
eva#

eva# show bgp nexthop
Current BGP nexthop cache:
 192.168.44.1 invalid, peer 192.168.44.1
  Must be Connected
  Last update: Mon Feb 10 19:05:19 2020

 192.168.201.139 valid [IGP metric 0], #paths 0, peer 192.168.201.139

So 192.168.201.139 is a peer for a connected route that has not been
created on .139, while 44.1 nexthop tracking has not succeeded yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5763 from ton31337/fix/return_without_parent
Renato Westphal [Mon, 10 Feb 2020 21:49:06 +0000 (18:49 -0300)]
Merge pull request #5763 from ton31337/fix/return_without_parent

*: Remove parenthesis on return for constants

5 years agoMerge pull request #5776 from volta-networks/fix_ldp_topol_test
Renato Westphal [Mon, 10 Feb 2020 21:48:25 +0000 (18:48 -0300)]
Merge pull request #5776 from volta-networks/fix_ldp_topol_test

ldpd: Fix LDP topotest to validate MPLS LDP CLI output

5 years agoMerge pull request #5770 from ton31337/fix/remove_bgp_flag_functions
Sri Mohana Singamsetty [Mon, 10 Feb 2020 16:31:59 +0000 (08:31 -0800)]
Merge pull request #5770 from ton31337/fix/remove_bgp_flag_functions

bgpd: Replace bgp_flag_* to [UN]SET/CHECK_FLAG macros

5 years agobgpd: Use readable macros for peer->gtsm_hops instead of literals 5785/head
Donatas Abraitis [Mon, 10 Feb 2020 14:17:40 +0000 (16:17 +0200)]
bgpd: Use readable macros for peer->gtsm_hops instead of literals

Do the same way like BGP_DEFAULT_TTL

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotests: Fix LDP topotest to validate MPLS LDP CLI output 5776/head
Karen Schoener [Thu, 6 Feb 2020 21:19:40 +0000 (16:19 -0500)]
tests: Fix LDP topotest to validate MPLS LDP CLI output

Fixing existing ldp-topol test to validate MPLS LDP CLI output.

Signed-off-by: Karen Schoener <karen@voltanet.io>
5 years agoMerge pull request #5772 from adharkar/frr-master-ipv6_nexthop
Donatas Abraitis [Mon, 10 Feb 2020 09:09:32 +0000 (11:09 +0200)]
Merge pull request #5772 from adharkar/frr-master-ipv6_nexthop

bgpd: EVPN crash because of incorrect nexthop for IPv6 prefix

5 years ago*: Remove parenthesis on return for constants 5763/head
Donatas Abraitis [Sun, 9 Feb 2020 12:21:56 +0000 (14:21 +0200)]
*: Remove parenthesis on return for constants

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotools: Add coccinelle script to remove parenthesis on return
Donatas Abraitis [Sun, 9 Feb 2020 12:20:37 +0000 (14:20 +0200)]
tools: Add coccinelle script to remove parenthesis on return

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5781 from LabNConsulting/working/master/tt-catch-notifications
Donatas Abraitis [Sun, 9 Feb 2020 07:12:05 +0000 (09:12 +0200)]
Merge pull request #5781 from LabNConsulting/working/master/tt-catch-notifications

topotest: bgp_l3vpn_to_bgp_vrf - report unexpected BGP notifications

5 years agotopotest: bgp_l3vpn_to_bgp_vrf - report unexpected BGP notifications 5781/head
Lou Berger [Sat, 8 Feb 2020 15:36:49 +0000 (10:36 -0500)]
topotest: bgp_l3vpn_to_bgp_vrf - report unexpected BGP notifications

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agodoc: Add few words about `bgp disable-ebgp-connected-route-check` 5778/head
Donatas Abraitis [Fri, 7 Feb 2020 18:56:54 +0000 (20:56 +0200)]
doc: Add few words about `bgp disable-ebgp-connected-route-check`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: EVPN crash because of incorrect nexthop for IPv6 prefix 5772/head
Ameya Dharkar [Thu, 6 Feb 2020 21:47:43 +0000 (13:47 -0800)]
bgpd: EVPN crash because of incorrect nexthop for IPv6 prefix

RCA:
When we install IPv6 prefix imported from EVPN RT-5 in vrf, nexthop of the IPv6
route should be IPv4 mapped IPv6 address. In function
install_evpn_route_entry_in_vrf, we generate a new attribute with IPv4 mapped
IPv6 nexthop, but we use parent->attr while creating the actual route.
Thus, Ipv4 nexthop is assigned to this route.
Because of this incorrect nexthop, we observed a crash in function
update_ipv6nh_for_route_install.

Fix:
Pass the new attribute with Ipv4 mapped Ipv6 nexthop to
bgp_create_evpn_bgp_path_info

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agobgpd: Replace bgp_flag_* to [UN]SET/CHECK_FLAG macros 5770/head
Donatas Abraitis [Thu, 6 Feb 2020 14:37:20 +0000 (16:37 +0200)]
bgpd: Replace bgp_flag_* to [UN]SET/CHECK_FLAG macros

Most of the code uses macros, thus let's keep the code unified.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotools: Add coccinelle script to replace all bgp_flag_* functions
Donatas Abraitis [Thu, 6 Feb 2020 14:24:22 +0000 (16:24 +0200)]
tools: Add coccinelle script to replace all bgp_flag_* functions

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5722 from donaldsharp/kernel_routes
Russ White [Thu, 6 Feb 2020 13:04:42 +0000 (08:04 -0500)]
Merge pull request #5722 from donaldsharp/kernel_routes

Kernel routes

5 years agoMerge pull request #5767 from ton31337/fix/replace_s_addr_0_to_INADDR_ANY
Donald Sharp [Thu, 6 Feb 2020 12:30:21 +0000 (07:30 -0500)]
Merge pull request #5767 from ton31337/fix/replace_s_addr_0_to_INADDR_ANY

MOAR CODE NAZI: replace s_addr 0 => INADDR_ANY

5 years agoMerge pull request #5765 from Spantik/bugs
Donald Sharp [Thu, 6 Feb 2020 12:27:27 +0000 (07:27 -0500)]
Merge pull request #5765 from Spantik/bugs

OSPF: Multi instance broken

5 years agotools: Add coccinelle script to replace s_addr 0 to INADDR_ANY 5767/head
Donatas Abraitis [Thu, 6 Feb 2020 06:50:50 +0000 (08:50 +0200)]
tools: Add coccinelle script to replace s_addr 0 to INADDR_ANY

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years ago*: Replace s_addr 0 => INADDR_ANY
Donatas Abraitis [Thu, 6 Feb 2020 06:49:02 +0000 (08:49 +0200)]
*: Replace s_addr 0 => INADDR_ANY

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5761 from qlyoung/fix-bgp-gr-cruft
Donatas Abraitis [Thu, 6 Feb 2020 06:16:25 +0000 (08:16 +0200)]
Merge pull request #5761 from qlyoung/fix-bgp-gr-cruft

Fix bgp gr style

5 years agoOSPF: Multi instance broken 5765/head
Santosh P K [Wed, 5 Feb 2020 17:40:00 +0000 (09:40 -0800)]
OSPF: Multi instance broken

Multi instance ospf support was broken due to PR #4564.
Adding fix back and extra checks to support multi instance
OSPF.

Fixes issues #5343 & #5741

Signed-off-by: Santosh P K <sapk@vmware.com>
5 years agoMerge pull request #5104 from opensourcerouting/route-map-nbv2
Donald Sharp [Wed, 5 Feb 2020 16:54:21 +0000 (11:54 -0500)]
Merge pull request #5104 from opensourcerouting/route-map-nbv2

lib: migrate route map to use northbound

5 years agolib: fix route-map YANG module on old gcc versions 5104/head
Rafael Zalamena [Wed, 5 Feb 2020 14:09:31 +0000 (11:09 -0300)]
lib: fix route-map YANG module on old gcc versions

Copy the fix made in 'lib/if.c' to 'lib/routemap_northbound.c' so we can
have a working YANG model when compiled with GCC version less than 5.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgpd: Update some attributes how they are handled if malformed 5744/head
Donatas Abraitis [Wed, 29 Jan 2020 13:09:37 +0000 (15:09 +0200)]
bgpd: Update some attributes how they are handled if malformed

According to https://tools.ietf.org/html/rfc7606 some of the attributes
MUST be handled as "treat-as-withdraw" approach.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5758 from sworleys/Doc-No-Pbr-Dyn-Rules
Renato Westphal [Wed, 5 Feb 2020 04:50:19 +0000 (01:50 -0300)]
Merge pull request #5758 from sworleys/Doc-No-Pbr-Dyn-Rules

doc: indicate non-support for dynamic pbr maps

5 years agoMerge pull request #5750 from qlyoung/fix-null-after-xfree
Renato Westphal [Wed, 5 Feb 2020 04:49:08 +0000 (01:49 -0300)]
Merge pull request #5750 from qlyoung/fix-null-after-xfree

*: don't null after XFREE; XFREE does this itself

5 years agoMerge pull request #5760 from ton31337/fix/shorthand_operator
Renato Westphal [Wed, 5 Feb 2020 04:45:55 +0000 (01:45 -0300)]
Merge pull request #5760 from ton31337/fix/shorthand_operator

zebra: Use shorthand operator in ifm_read()

5 years agoMerge pull request #5717 from pguibert6WIND/flowspec_issue_redistribute
Quentin Young [Tue, 4 Feb 2020 20:48:24 +0000 (15:48 -0500)]
Merge pull request #5717 from pguibert6WIND/flowspec_issue_redistribute

Flowspec issue redistribute

5 years agoMerge pull request #5759 from ton31337/fix/void_no_return
Quentin Young [Tue, 4 Feb 2020 20:45:01 +0000 (15:45 -0500)]
Merge pull request #5759 from ton31337/fix/void_no_return

zebra, lib: Remove return from void functions

5 years agobgpd, lib: fix style from BGP GR code 5761/head
Quentin Young [Fri, 31 Jan 2020 18:04:00 +0000 (13:04 -0500)]
bgpd, lib: fix style from BGP GR code

This patch fixes the noncompliant style for the following commit range:

4a6e80fbf
2ba1fe695
efcb2ebbb
8c48b3b69
dc95985fe
0f0444fbd
85ef4179a
eb451ee58
2d3dd828d
9e3b51a7f
d6e3c15b6
34aa74486
6102cb7fe
d7b3cda6f
2bb5d39b1
5f9c1aa29
5cce3f054
3a75afa4b
f009ff269
cfd47646b
2986cac29
055679e91
034e185dc
794b37d52
b0965c44e
949b0f24f
63696f1d8

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: use _RO list iter variant for gr macro
Quentin Young [Fri, 31 Jan 2020 18:03:27 +0000 (13:03 -0500)]
bgpd: use _RO list iter variant for gr macro

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: remove null check before XFREE 5750/head
Quentin Young [Tue, 4 Feb 2020 18:19:37 +0000 (13:19 -0500)]
*: remove null check before XFREE

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: Use shorthand operator in ifm_read() 5760/head
Donatas Abraitis [Tue, 4 Feb 2020 18:11:59 +0000 (20:11 +0200)]
zebra: Use shorthand operator in ifm_read()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotools: Add coccinelle script to check if we use shorthand operators
Donatas Abraitis [Tue, 4 Feb 2020 18:08:50 +0000 (20:08 +0200)]
tools: Add coccinelle script to check if we use shorthand operators

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotools: Add coccinelle script to check if void does not have return 5759/head
Donatas Abraitis [Tue, 4 Feb 2020 18:05:40 +0000 (20:05 +0200)]
tools: Add coccinelle script to check if void does not have return

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra, lib: Remove return from void functions
Donatas Abraitis [Tue, 4 Feb 2020 18:05:21 +0000 (20:05 +0200)]
zebra, lib: Remove return from void functions

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agolib: fix route map northbound memory leak
Rafael Zalamena [Tue, 15 Oct 2019 02:29:19 +0000 (23:29 -0300)]
lib: fix route map northbound memory leak

Keep a list of hook contexts used by northbound so we don't lose the
pointer when free()ing the route map index entry data.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years ago*: fix route map integration
Rafael Zalamena [Tue, 1 Oct 2019 20:56:41 +0000 (17:56 -0300)]
*: fix route map integration

Add the appropriated code to bootstrap route map northbound for all
daemons.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: add backward compatibility for route map
Rafael Zalamena [Tue, 1 Oct 2019 18:52:51 +0000 (15:52 -0300)]
lib: add backward compatibility for route map

Allow old CLI users to still print their configuration without migrating
to northbound.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: fix route map generic error output
Rafael Zalamena [Mon, 30 Sep 2019 18:02:15 +0000 (15:02 -0300)]
lib: fix route map generic error output

Two fixes here:

*   Don't attempt to use `vty` pointer in vty;
*   When `vty` is unavailable output to log;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoyang/lib: add filter model to code
Rafael Zalamena [Tue, 1 Oct 2019 20:56:16 +0000 (17:56 -0300)]
yang/lib: add filter model to code

This fixes a warning on daemons that use route map about filter yang
model not being included in the binary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: implement new route map CLI
Rafael Zalamena [Mon, 30 Sep 2019 18:01:46 +0000 (15:01 -0300)]
lib: implement new route map CLI

Use the northbound back-end instead of the old route map CLI.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: implement route map northbound
Rafael Zalamena [Mon, 30 Sep 2019 13:34:49 +0000 (10:34 -0300)]
lib: implement route map northbound

Based on the route map old CLI, implement the route map handling using
the exported functions.

Use a curry-like programming pattern avoid code repetition when
destroying match/set entries. This is needed by other daemons that
implement custom route map functions and need to pass to lib their
specific destroy functions.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: export route map structures and functions
Rafael Zalamena [Mon, 30 Sep 2019 13:17:33 +0000 (10:17 -0300)]
lib: export route map structures and functions

These exported items are going to be used by the new northbound CLI.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoyang: update route map model
Rafael Zalamena [Fri, 27 Sep 2019 22:32:10 +0000 (19:32 -0300)]
yang: update route map model

Important changes:

  * Rename top container `route-map` to `lib`;
  * Rename list `instance` to `route-map`;
  * Move route map repeated data to list `entry`;
  * Use interface reference instead of typedef'ed string;
  * Remove some zebra specific route map conditions;
  * Protect `tag` set value with `when "./action = 'tag'"`;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #5169 from ton31337/feature/sequence_numbers_for_community_lists
Quentin Young [Tue, 4 Feb 2020 16:56:29 +0000 (11:56 -0500)]
Merge pull request #5169 from ton31337/feature/sequence_numbers_for_community_lists

bgpd: Use sequence numbers for community lists

5 years agodoc: indicate non-support for dynamic pbr maps 5758/head
Stephen Worley [Tue, 4 Feb 2020 16:35:31 +0000 (11:35 -0500)]
doc: indicate non-support for dynamic pbr maps

Indicate in the doc clearly that we do not support the dynamic
creation of pbr maps for sub-interfaces when the master has
an interface. Such as in vlans. It must be explicitly added.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agobgpd: forge bgp flowspec packets to be sent 5717/head
Philippe Guibert [Tue, 21 Jan 2020 12:17:45 +0000 (13:17 +0100)]
bgpd: forge bgp flowspec packets to be sent

bgp flowspec packets are being forged correctly. There is no need to
check for bgp length, as the bgp nlri length is checked at reception.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: when nexthop IP is available for flowspec, keep it
Philippe Guibert [Tue, 21 Jan 2020 12:15:42 +0000 (13:15 +0100)]
bgpd: when nexthop IP is available for flowspec, keep it

keep original nexthop IP address when propagating bgp updates to other
peers.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #5739 from mjstapp/nhg_show_ordered
Renato Westphal [Tue, 4 Feb 2020 16:37:24 +0000 (13:37 -0300)]
Merge pull request #5739 from mjstapp/nhg_show_ordered

zebra: show zebra nexthop-groups without copying

5 years agoMerge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn
Donald Sharp [Tue, 4 Feb 2020 16:37:10 +0000 (11:37 -0500)]
Merge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn

bgpd: additional Prefix-SID sub-types for supporting SRv6 l3vpn

5 years agoMerge pull request #5746 from donaldsharp/bgp_sa
Russ White [Tue, 4 Feb 2020 16:24:08 +0000 (11:24 -0500)]
Merge pull request #5746 from donaldsharp/bgp_sa

Coverioty sa stuff

5 years agoMerge pull request #5207 from Spantik/ZERBA_GR
Donald Sharp [Tue, 4 Feb 2020 15:57:29 +0000 (10:57 -0500)]
Merge pull request #5207 from Spantik/ZERBA_GR

Zebra: Adding GR infrastructure for clients.

5 years agozebra: show zebra nexthop-groups without copying 5739/head
Mark Stapp [Tue, 28 Jan 2020 19:45:53 +0000 (14:45 -0500)]
zebra: show zebra nexthop-groups without copying

Use a hash walker/iterator instead of a temporary list to
show zebra's nexthop-groups/nexthop-hash-entries.

Signed-off-by: Mark Stapp <mjs@voltanet.io>