Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: Filtering received EVPN routes based on VNI does not work #4078

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

lkrishnamoor
Copy link
Contributor

@lkrishnamoor lkrishnamoor commented Apr 4, 2019

Issue1: When "neighbor X.X.X.X route-map RM-VNI-FILTER in" is configured under evpn address-family,
all the received routes are dropped regardless of whether the route has a matching vni or not.

Issue2: Routes with 2 labels are not filtered correctly

Issue3: Interpreting the label based on tunnel type, vxlan was not done correctly.
Vxlan label has 24 bits, whereas, MPLS label is 20 bits long

Fix1: The handler bgp_update() that services the received route ignored the route's label while deciding whether to filter it or not. As part of the fix, the handler now uses the label info to make the decision about whether to filter the route or not.

Fix2: route_match_vni() now tries to match both the labels within the route, not just the one.

Related fix : Extract tunnel type

This fix relies on PR 4314 #4314 to extract the tunnel type from bgp extended communities. The information about the route's tunnel type (vxlan or mpls) is needed to apply "match evpn vni xx" rule. This rule is applicable to vxlan routes, and should exit safely for mpls based evpn routes.

Related fix: a 3rd state for the route map filter.

PR 4315 #4315 is crucial to this fix, because it provides a way for "match evpn vni xx" rule to safely abort the check for non-applicable routes (mpls based evpn routes)

Signed-off-by: Lakshman Krishnamoorthy lkrishnamoor@vmware.com

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 4, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 20608d9
Date 04/03/2019
Start 21:35:56
Finish 21:59:44
Run-Time 23:48
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-03-21:35:56.txt
Log autoscript-2019-04-03-21:36:40.log.bz2
Memory 501 502 429

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7127/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

<TITLE>clang_check</TITLE>

clang_check

bgpd/bgp_route.c Outdated Show resolved Hide resolved
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:832:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.1IfNG8 (%build)
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:832: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:832: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
Successful on other platforms
  • FreeBSD 11 amd64 build
  • Debian 8 amd64 build
  • NetBSD 6 amd64 build
  • OpenBSD 6 amd64 build
  • Ubuntu 16.04 amd64 build
  • Ubuntu 18.04 amd64 build
  • OmniOS amd64 build
  • Ubuntu 12.04 amd64 build
  • Debian 9 amd64 build
  • NetBSD 7 amd64 build
  • Ubuntu 14.04 amd64 build
  • Ubuntu 16.04 i386 build

Warnings Generated during build:

Checkout code: Successful with additional warnings
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:832:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.1IfNG8 (%build)
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7230/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:832: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:832: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
Report for bgp_routemap.c | 8 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-26635/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-26635/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-26635/bgp_routemap.c:826:
< WARNING: suspect code indent for conditional statements (16, 16)
< #831: FILE: /tmp/f1-26635/bgp_routemap.c:831:

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 11, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 483ed18
Date 04/11/2019
Start 18:30:08
Finish 18:54:10
Run-Time 24:02
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-11-18:30:08.txt
Log autoscript-2019-04-11-18:31:00.log.bz2
Memory 499 488 429

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 12, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 b04650d
Date 04/12/2019
Start 14:06:03
Finish 14:29:46
Run-Time 23:43
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-12-14:06:03.txt
Log autoscript-2019-04-12-14:06:46.log.bz2
Memory 495 496 429

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7234/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for bgp_routemap.c | 6 issues
===============================================
< WARNING: Block comments should align the * on each line
< #808: FILE: /tmp/f1-449/bgp_routemap.c:808:
< ERROR: "(foo*)" should be "(foo *)"
< #820: FILE: /tmp/f1-449/bgp_routemap.c:820:
< WARNING: Block comments should align the * on each line
< #827: FILE: /tmp/f1-449/bgp_routemap.c:827:
Report for routemap.c | 10 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-449/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-449/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-449/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-449/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-449/routemap.c:1471:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA c5dafdb

No Changes in Static Analysis warnings compared to base

66 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7234/artifact/shared/static_analysis/index.html

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after the most recent pushes; will wait a couple of days and merge if no-one else comments. :-)

bgpd/bgp_attr_evpn.c Outdated Show resolved Hide resolved
bgpd/bgp_route.c Outdated Show resolved Hide resolved
@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 25, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 665dc91
Date 04/25/2019
Start 16:36:09
Finish 16:59:54
Run-Time 23:45
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-25-16:36:09.txt
Log autoscript-2019-04-25-16:36:53.log.bz2
Memory 447 444 374

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:832: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:832: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:832:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7QgXDz (%build)
Successful on other platforms
  • NetBSD 7 amd64 build
  • Ubuntu 16.04 amd64 build
  • Ubuntu 16.04 i386 build
  • Ubuntu 18.04 amd64 build
  • NetBSD 6 amd64 build
  • Debian 9 amd64 build
  • Debian 8 amd64 build
  • Ubuntu 12.04 amd64 build
  • Ubuntu 14.04 amd64 build
  • OmniOS amd64 build
  • OpenBSD 6 amd64 build
  • FreeBSD 11 amd64 build

Warnings Generated during build:

Checkout code: Successful with additional warnings
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:832: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:832: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7368/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:832:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:832:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7QgXDz (%build)
Report for bgp_routemap.c | 8 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-14762/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-14762/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-14762/bgp_routemap.c:826:
< WARNING: suspect code indent for conditional statements (16, 16)
< #831: FILE: /tmp/f1-14762/bgp_routemap.c:831:

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 25, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 b513aaa
Date 04/25/2019
Start 17:06:00
Finish 17:29:38
Run-Time 23:38
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-25-17:06:00.txt
Log autoscript-2019-04-25-17:06:44.log.bz2
Memory 448 447 374

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7367/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for bgp_attr.c | 2 issues
===============================================
< ERROR: "(foo*)" should be "(foo *)"
< #1961: FILE: /tmp/f1-30958/bgp_attr.c:1961:
Report for bgp_attr_evpn.c | 4 issues
===============================================
< ERROR: code indent should use tabs where possible
< #257: FILE: /tmp/f1-30958/bgp_attr_evpn.c:257:
< WARNING: please, no spaces at the start of a line
< #257: FILE: /tmp/f1-30958/bgp_attr_evpn.c:257:
Report for bgp_routemap.c | 6 issues
===============================================
< WARNING: Block comments should align the * on each line
< #808: FILE: /tmp/f1-30958/bgp_routemap.c:808:
< ERROR: "(foo*)" should be "(foo *)"
< #820: FILE: /tmp/f1-30958/bgp_routemap.c:820:
< WARNING: Block comments should align the * on each line
< #827: FILE: /tmp/f1-30958/bgp_routemap.c:827:
Report for routemap.c | 10 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-30958/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-30958/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-30958/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-30958/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-30958/routemap.c:1471:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA 5716ca9

Fixed warnings:

  • Logic error: Dereference of null pointer in ripngd/ripng_interface.c, function ripng_if_down, line 187

New warnings:

Static Analysis warning summary compared to base:

  • Fixed warnings: 1
  • New warnings: 55

66 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7367/artifact/shared/static_analysis/index.html

@lkrishnamoor lkrishnamoor force-pushed the rmap_vni_filter branch 2 times, most recently from f2189da to fd8bc15 Compare April 25, 2019 23:56
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

Ubuntu 16.04 i386 build: Failed (click for details) Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1604I386/config.status/config.status

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1604I386/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
OmniOS amd64 build: Failed (click for details) OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI010BUILD/config.status/config.status

Make failed for OmniOS amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI010BUILD/ErrorLog/log_make.txt)

checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc supports -diag-error 10006... no
checking whether gcc supports -std=gnu11... yes
checking whether gcc -std=gnu11 supports -g... yes
checking whether gcc -std=gnu11 supports -Os... yes
checking whether gcc -std=gnu11 supports -fno-omit-frame-pointer... yes
checking whether gcc -std=gnu11 supports -funwind-tables... yes
checking whether gcc -std=gnu11 supports -Wall... yes
Debian 9 amd64 build: Failed (click for details) Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI021BUILD/config.status/config.status

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI021BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
NetBSD 7 amd64 build: Failed (click for details) NetBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI012BUILD/config.status/config.status

Make failed for NetBSD 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI012BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 16.04 amd64 build: Failed (click for details) Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI014BUILD/config.status/config.status

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI014BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI006BUILD/config.status/config.status

Make failed for CentOS 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI006BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252: error: conflicting types for bgp_attr_extcom_tunnel_type
./bgpd/bgp_attr_evpn.h:70: note: previous declaration of bgp_attr_extcom_tunnel_type was here
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: Leaving directory `/home/ci/cibuild.7370/frr-source'
make[1]: *** [bgpd/bgp_attr_evpn.o] Error 1
make: *** [all] Error 2
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI005BUILD/config.status/config.status

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI005BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
Ubuntu 14.04 amd64 build: Failed (click for details) Ubuntu 14.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI001BUILD/config.status/config.status

Make failed for Ubuntu 14.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI001BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
Debian 8 amd64 build: Failed (click for details) Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI008BLD/config.status/config.status

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI008BLD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
OpenBSD 6 amd64 build: Failed (click for details) OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI011BUILD/config.status/config.status

Make failed for OpenBSD 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI011BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:253: error: conflicting types for 'bgp_attr_extcom_tunnel_type'
./bgpd/bgp_attr_evpn.h:71: error: previous declaration of 'bgp_attr_extcom_tunnel_type' was here
cc1: error: unrecognized command line option "-Wno-unused-result"
gmake[1]: *** [Makefile:6559: bgpd/bgp_attr_evpn.o] Error 1
gmake[1]: Leaving directory '/home/ci/cibuild.7370/frr-source'
gmake: *** [Makefile:3680: all] Error 2
FreeBSD 11 amd64 build: Failed (click for details) FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI009BUILD/config.status/config.status

Make failed for FreeBSD 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI009BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
NetBSD 6 amd64 build: Failed (click for details) NetBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI007BUILD/config.status/config.status

Make failed for NetBSD 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI007BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for 'bgp_attr_extcom_tunnel_type'
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of 'bgp_attr_extcom_tunnel_type' was here
gmake[1]: *** [Makefile:6560: bgpd/bgp_attr_evpn.o] Error 1
gmake[1]: Leaving directory '/home/ci/cibuild.7370/frr-source'
gmake: *** [Makefile:3681: all] Error 2
Ubuntu 18.04 amd64 build: Failed (click for details) Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1804AMD64/config.status/config.status

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1804AMD64/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
Successful on other platforms
  • Ubuntu 12.04 amd64 build

Warnings Generated during build:

Checkout code: Successful with additional warnings
Ubuntu 16.04 i386 build: Failed (click for details) Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1604I386/config.status/config.status

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1604I386/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
OmniOS amd64 build: Failed (click for details) OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI010BUILD/config.status/config.status

Make failed for OmniOS amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI010BUILD/ErrorLog/log_make.txt)

checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc supports -diag-error 10006... no
checking whether gcc supports -std=gnu11... yes
checking whether gcc -std=gnu11 supports -g... yes
checking whether gcc -std=gnu11 supports -Os... yes
checking whether gcc -std=gnu11 supports -fno-omit-frame-pointer... yes
checking whether gcc -std=gnu11 supports -funwind-tables... yes
checking whether gcc -std=gnu11 supports -Wall... yes
Debian 9 amd64 build: Failed (click for details) Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI021BUILD/config.status/config.status

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI021BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
NetBSD 7 amd64 build: Failed (click for details) NetBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI012BUILD/config.status/config.status

Make failed for NetBSD 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI012BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 16.04 amd64 build: Failed (click for details) Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI014BUILD/config.status/config.status

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI014BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI006BUILD/config.status/config.status

Make failed for CentOS 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI006BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252: error: conflicting types for bgp_attr_extcom_tunnel_type
./bgpd/bgp_attr_evpn.h:70: note: previous declaration of bgp_attr_extcom_tunnel_type was here
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: Leaving directory `/home/ci/cibuild.7370/frr-source'
make[1]: *** [bgpd/bgp_attr_evpn.o] Error 1
make: *** [all] Error 2
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI005BUILD/config.status/config.status

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI005BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
Ubuntu 14.04 amd64 build: Failed (click for details) Ubuntu 14.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI001BUILD/config.status/config.status

Make failed for Ubuntu 14.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI001BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
Debian 8 amd64 build: Failed (click for details) Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI008BLD/config.status/config.status

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI008BLD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
OpenBSD 6 amd64 build: Failed (click for details) OpenBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI011BUILD/config.status/config.status

Make failed for OpenBSD 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI011BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:253: error: conflicting types for 'bgp_attr_extcom_tunnel_type'
./bgpd/bgp_attr_evpn.h:71: error: previous declaration of 'bgp_attr_extcom_tunnel_type' was here
cc1: error: unrecognized command line option "-Wno-unused-result"
gmake[1]: *** [Makefile:6559: bgpd/bgp_attr_evpn.o] Error 1
gmake[1]: Leaving directory '/home/ci/cibuild.7370/frr-source'
gmake: *** [Makefile:3680: all] Error 2
FreeBSD 11 amd64 build: Failed (click for details) FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI009BUILD/config.status/config.status

Make failed for FreeBSD 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI009BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
NetBSD 6 amd64 build: Failed (click for details) NetBSD 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI007BUILD/config.status/config.status

Make failed for NetBSD 6 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/CI007BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for 'bgp_attr_extcom_tunnel_type'
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of 'bgp_attr_extcom_tunnel_type' was here
gmake[1]: *** [Makefile:6560: bgpd/bgp_attr_evpn.o] Error 1
gmake[1]: Leaving directory '/home/ci/cibuild.7370/frr-source'
gmake: *** [Makefile:3681: all] Error 2
Ubuntu 18.04 amd64 build: Failed (click for details) Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1804AMD64/config.status/config.status

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7370/artifact/U1804AMD64/ErrorLog/log_make.txt)

  CC       bgpd/bgp_attr.o
  CC       bgpd/bgp_attr_evpn.o
bgpd/bgp_attr_evpn.c:252:6: error: conflicting types for bgp_attr_extcom_tunnel_type
 bool bgp_attr_extcom_tunnel_type(struct attr *attr, uint16_t *tunnel_type)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./bgpd/bgp_attr.h:25:0,
                 from bgpd/bgp_attr_evpn.c:31:
./bgpd/bgp_attr_evpn.h:70:13: note: previous declaration of bgp_attr_extcom_tunnel_type was here
 extern bool bgp_attr_extcom_tunnel_type(struct attr *attr,
<stdin>:348: trailing whitespace.
	
warning: 1 line adds whitespace errors.
Report for bgp_attr.c | 2 issues
===============================================
< ERROR: "(foo*)" should be "(foo *)"
< #1961: FILE: /tmp/f1-9886/bgp_attr.c:1961:
Report for bgp_routemap.c | 6 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-9886/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-9886/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-9886/bgp_routemap.c:826:
Report for routemap.c | 12 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-9886/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-9886/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-9886/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-9886/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-9886/routemap.c:1471:
< ERROR: trailing whitespace
< #1630: FILE: /tmp/f1-9886/routemap.c:1630:

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 26, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 c42cead
Date 04/25/2019
Start 19:46:07
Finish 20:09:56
Run-Time 23:49
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-25-19:46:07.txt
Log autoscript-2019-04-25-19:46:52.log.bz2
Memory 447 443 374

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Apr 26, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 fd8bc15
Date 04/25/2019
Start 20:16:08
Finish 20:39:49
Run-Time 23:41
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-04-25-20:16:08.txt
Log autoscript-2019-04-25-20:16:52.log.bz2
Memory 448 429 374

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7369/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:351: trailing whitespace.
	
warning: 1 line adds whitespace errors.
Report for bgp_attr.c | 2 issues
===============================================
< ERROR: "(foo*)" should be "(foo *)"
< #1961: FILE: /tmp/f1-5747/bgp_attr.c:1961:
Report for bgp_attr_evpn.c | 4 issues
===============================================
< ERROR: code indent should use tabs where possible
< #257: FILE: /tmp/f1-5747/bgp_attr_evpn.c:257:
< WARNING: please, no spaces at the start of a line
< #257: FILE: /tmp/f1-5747/bgp_attr_evpn.c:257:
Report for bgp_routemap.c | 6 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-5747/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-5747/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-5747/bgp_routemap.c:826:
Report for routemap.c | 12 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-5747/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-5747/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-5747/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-5747/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-5747/routemap.c:1471:
< ERROR: trailing whitespace
< #1630: FILE: /tmp/f1-5747/routemap.c:1630:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA 69b43ce

Fixed warnings:

  • Logic error: Dereference of null pointer in ripngd/ripng_interface.c, function ripng_if_down, line 187

New warnings:

Static Analysis warning summary compared to base:

  • Fixed warnings: 1
  • New warnings: 55

66 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7369/artifact/shared/static_analysis/index.html

@donaldsharp
Copy link
Member

rebase off of current master and force push the changes and clean up the format issues then I'll look at it.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7371/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:347: trailing whitespace.
	
warning: 1 line adds whitespace errors.
Report for bgp_routemap.c | 8 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-21772/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-21772/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-21772/bgp_routemap.c:826:
< WARNING: suspect code indent for conditional statements (16, 16)
< #831: FILE: /tmp/f1-21772/bgp_routemap.c:831:
Report for routemap.c | 12 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-21772/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-21772/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-21772/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-21772/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-21772/routemap.c:1471:
< ERROR: trailing whitespace
< #1630: FILE: /tmp/f1-21772/routemap.c:1630:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA ee02d38
  • Base image data for Git ee02d38 does not exist - compare skipped

66 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7371/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7372/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
<stdin>:351: trailing whitespace.
	
warning: 1 line adds whitespace errors.
Report for bgp_attr.c | 2 issues
===============================================
< ERROR: "(foo*)" should be "(foo *)"
< #1961: FILE: /tmp/f1-30324/bgp_attr.c:1961:
Report for bgp_attr_evpn.c | 4 issues
===============================================
< ERROR: code indent should use tabs where possible
< #257: FILE: /tmp/f1-30324/bgp_attr_evpn.c:257:
< WARNING: please, no spaces at the start of a line
< #257: FILE: /tmp/f1-30324/bgp_attr_evpn.c:257:
Report for bgp_routemap.c | 6 issues
===============================================
< WARNING: Block comments should align the * on each line
< #807: FILE: /tmp/f1-30324/bgp_routemap.c:807:
< ERROR: "(foo*)" should be "(foo *)"
< #819: FILE: /tmp/f1-30324/bgp_routemap.c:819:
< WARNING: Block comments should align the * on each line
< #826: FILE: /tmp/f1-30324/bgp_routemap.c:826:
Report for routemap.c | 12 issues
===============================================
< ERROR: code indent should use tabs where possible
< #1464: FILE: /tmp/f1-30324/routemap.c:1464:
< ERROR: code indent should use tabs where possible
< #1465: FILE: /tmp/f1-30324/routemap.c:1465:
< ERROR: code indent should use tabs where possible
< #1467: FILE: /tmp/f1-30324/routemap.c:1467:
< ERROR: code indent should use tabs where possible
< #1469: FILE: /tmp/f1-30324/routemap.c:1469:
< ERROR: code indent should use tabs where possible
< #1471: FILE: /tmp/f1-30324/routemap.c:1471:
< ERROR: trailing whitespace
< #1630: FILE: /tmp/f1-30324/routemap.c:1630:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA ee02d38
  • Base image data for Git ee02d38 does not exist - compare skipped

66 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7372/artifact/shared/static_analysis/index.html

@srimohans
Copy link
Contributor

@donaldsharp Lakshman did rebase and all tests passed after that.

@donaldsharp
Copy link
Member

@srimohans -> no way anything was rebased w/ 66 SA warnings left

@riw777
Copy link
Member

riw777 commented Apr 26, 2019

still looks like it needs a rebase to me... :-)

@srimohans
Copy link
Contributor

@donaldsharp @riw777 I respectfully agree with both of you :)

@lkrishnamoor
Copy link
Contributor Author

Created 2 separate PRs #4314 and #4315 for the lib/routemap.c change, and extract tunnel type change. @donaldsharp @vivek-cumulus @srimohans @louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:831:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:831:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.MHXy58 (%build)
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:831: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:831: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:831: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
Successful on other platforms
  • Ubuntu 12.04 amd64 build
  • Ubuntu 14.04 amd64 build
  • Ubuntu 16.04 amd64 build
  • Ubuntu 18.04 amd64 build
  • FreeBSD 12 amd64 build
  • Ubuntu 16.04 i386 build
  • Debian 8 amd64 build
  • FreeBSD 11 amd64 build
  • Ubuntu 18.04 ppc64le build
  • NetBSD 6 amd64 build
  • OmniOS amd64 build
  • OpenBSD 6 amd64 build
  • NetBSD 7 amd64 build
  • Debian 9 amd64 build

Warnings Generated during build:

Checkout code: Successful with additional warnings
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI005BUILD/config.status/config.status

Package building failed for CentOS 7 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI005BUILD/ErrorLog/log_package_build.txt)

 ^
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:831:4: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
    BGP_ENCAP_TYPE_VXLAN)
    ^
bgpd/bgp_routemap.c:831:4: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.MHXy58 (%build)
CentOS 6 amd64 build: Failed (click for details) CentOS 6 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI006BUILD/config.status/config.status

Package building failed for CentOS 6 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7637/artifact/CI006BUILD/ErrorLog/log_package_build.txt)

cc1: warning: unrecognized command line option "-Wno-unused-result"
bgpd/bgp_routemap.c: In function 'route_match_vni':
bgpd/bgp_routemap.c:831: error: 'BGP_ENCAP_TYPE_VXLAN' undeclared (first use in this function)
bgpd/bgp_routemap.c:831: error: (Each undeclared identifier is reported only once
bgpd/bgp_routemap.c:831: error: for each function it appears in.)
At top level:
cc1: warning: unrecognized command line option "-Wno-unused-result"
make[1]: *** [bgpd/bgp_routemap.o] Error 1
make: *** [all] Error 2
Report for bgp_routemap.c | 9 issues
===============================================
< ERROR: strcpy() is error-prone; please use strlcpy()#4291: FILE: /tmp/f1-17030/bgp_routemap.c:4291:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4267: FILE: /tmp/f2-17030/bgp_routemap.c:4267:
370c379
< ERROR: strcpy() is error-prone; please use strlcpy()#4292: FILE: /tmp/f1-17030/bgp_routemap.c:4292:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4268: FILE: /tmp/f2-17030/bgp_routemap.c:4268:
374c383
< #4559: FILE: /tmp/f1-17030/bgp_routemap.c:4559:

@LabN-CI
Copy link
Collaborator

LabN-CI commented May 11, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 351d8d3
Date 05/11/2019
Start 15:45:42
Finish 16:10:06
Run-Time 24:24
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-05-11-15:45:42.txt
Log autoscript-2019-05-11-15:46:27.log.bz2
Memory 431 432 359

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented May 13, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 1ed974c
Date 05/13/2019
Start 15:00:45
Finish 15:24:54
Run-Time 24:09
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-05-13-15:00:45.txt
Log autoscript-2019-05-13-15:01:31.log.bz2
Memory 431 431 359

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7654/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for bgp_routemap.c | 9 issues
===============================================
< ERROR: strcpy() is error-prone; please use strlcpy()#4292: FILE: /tmp/f1-2314/bgp_routemap.c:4292:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4267: FILE: /tmp/f2-2314/bgp_routemap.c:4267:
370c379
< ERROR: strcpy() is error-prone; please use strlcpy()#4293: FILE: /tmp/f1-2314/bgp_routemap.c:4293:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4268: FILE: /tmp/f2-2314/bgp_routemap.c:4268:
374c383
< #4560: FILE: /tmp/f1-2314/bgp_routemap.c:4560:

CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA 4ac9d2c

No Changes in Static Analysis warnings compared to base

12 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7654/artifact/shared/static_analysis/index.html

lkrishnamoor added a commit to lkrishnamoor/frr that referenced this pull request May 15, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_OKAY

Traditionally route map rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
Depending on this response, the following statemachine decided the
course of action:

State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next rule, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_OKAY (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_IGNORE)?

We chose to go with RMAP_OKAY (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_OKAY
Then, proceed to other rules, otherwise return RMAP_OKAY by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
lkrishnamoor added a commit to lkrishnamoor/frr that referenced this pull request May 18, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_OKAY

Traditionally route map rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
Depending on this response, the following statemachine decided the
course of action:

State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next rule, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_OKAY (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_IGNORE)?

We chose to go with RMAP_OKAY (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_OKAY
Then, proceed to other rules, otherwise return RMAP_OKAY by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
lkrishnamoor added a commit to lkrishnamoor/frr that referenced this pull request May 19, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH)
State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_NOOP)?
RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd.

We chose to go with RMAP_NOOP (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_NOOP
Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
lkrishnamoor added a commit to lkrishnamoor/frr that referenced this pull request May 19, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH)
State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_NOOP)?
RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd.

We chose to go with RMAP_NOOP (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_NOOP
Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented May 25, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 1ed974c
Date 05/24/2019
Start 22:57:35
Finish 23:20:22
Run-Time 22:47
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-05-24-22:57:35.txt
Log autoscript-2019-05-24-22:58:38.log.bz2
Memory 419 431 360

For details, please contact louberger

@srimohans
Copy link
Contributor

@donaldsharp

all the comments from you were addressed by submitter. Multiple reviewers had already approved this. Can you go ahead, approve & merge this ?

@donaldsharp
Copy link
Member

CI:rerun

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

Debian 9 amd64 build: Failed (click for details) Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI021BUILD/config.status/config.status

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI021BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 18.04 ppc64le build: Failed (click for details) Ubuntu 18.04 ppc64le build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/config.log/ Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/config.status/config.status

Make failed for Ubuntu 18.04 ppc64le build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
  CC       bgpd/bgp_flowspec_vty.o
  CC       bgpd/bgp_fsm.o
OmniOS amd64 build: Failed (click for details) OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI010BUILD/config.status/config.status

Make failed for OmniOS amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI010BUILD/ErrorLog/log_make.txt)

checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc supports -diag-error 10006... no
checking whether gcc supports -std=gnu11... yes
checking whether gcc -std=gnu11 supports -g... yes
checking whether gcc -std=gnu11 supports -Os... yes
checking whether gcc -std=gnu11 supports -fno-omit-frame-pointer... yes
checking whether gcc -std=gnu11 supports -funwind-tables... yes
checking whether gcc -std=gnu11 supports -Wall... yes
NetBSD 7 amd64 build: Failed (click for details) NetBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI012BUILD/config.status/config.status

Make failed for NetBSD 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI012BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 16.04 amd64 build: Failed (click for details) Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI014BUILD/config.status/config.status

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI014BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 14.04 amd64 build: Failed (click for details) Ubuntu 14.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI001BUILD/config.status/config.status

Make failed for Ubuntu 14.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI001BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 16.04 i386 build: Failed (click for details) Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1604I386/config.status/config.status

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1604I386/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Debian 8 amd64 build: Failed (click for details) Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI008BLD/config.status/config.status

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI008BLD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
FreeBSD 11 amd64 build: Failed (click for details) FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI009BUILD/config.status/config.status

Make failed for FreeBSD 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI009BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Fedora 29 amd64 build: Failed (click for details) Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/F29BUILD/config.status/config.status

Make failed for Fedora 29 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/F29BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI005BUILD/config.status/config.status

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI005BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
FreeBSD 12 amd64 build: Failed (click for details) FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/FBSD12AMD64/config.status/config.status

Make failed for FreeBSD 12 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/FBSD12AMD64/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 18.04 amd64 build: Failed (click for details) Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804AMD64/config.status/config.status

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804AMD64/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Successful on other platforms
  • CentOS 6 amd64 build
  • Ubuntu 12.04 amd64 build
  • OpenBSD 6 amd64 build
  • NetBSD 6 amd64 build

Warnings Generated during build:

Checkout code: Successful with additional warnings
Debian 9 amd64 build: Failed (click for details) Debian 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI021BUILD/config.status/config.status

Make failed for Debian 9 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI021BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 18.04 ppc64le build: Failed (click for details) Ubuntu 18.04 ppc64le build: config.log output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/config.log/ Ubuntu 18.04 ppc64le build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/config.status/config.status

Make failed for Ubuntu 18.04 ppc64le build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804PPC64LEBUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
  CC       bgpd/bgp_flowspec_vty.o
  CC       bgpd/bgp_fsm.o
OmniOS amd64 build: Failed (click for details) OmniOS amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI010BUILD/config.status/config.status

Make failed for OmniOS amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI010BUILD/ErrorLog/log_make.txt)

checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether gcc supports -diag-error 10006... no
checking whether gcc supports -std=gnu11... yes
checking whether gcc -std=gnu11 supports -g... yes
checking whether gcc -std=gnu11 supports -Os... yes
checking whether gcc -std=gnu11 supports -fno-omit-frame-pointer... yes
checking whether gcc -std=gnu11 supports -funwind-tables... yes
checking whether gcc -std=gnu11 supports -Wall... yes
NetBSD 7 amd64 build: Failed (click for details) NetBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI012BUILD/config.status/config.status

Make failed for NetBSD 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI012BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 16.04 amd64 build: Failed (click for details) Ubuntu 16.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI014BUILD/config.status/config.status

Make failed for Ubuntu 16.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI014BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 14.04 amd64 build: Failed (click for details) Ubuntu 14.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI001BUILD/config.status/config.status

Make failed for Ubuntu 14.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI001BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Ubuntu 16.04 i386 build: Failed (click for details) Ubuntu 16.04 i386 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1604I386/config.status/config.status

Make failed for Ubuntu 16.04 i386 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1604I386/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Debian 8 amd64 build: Failed (click for details) Debian 8 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI008BLD/config.status/config.status

Make failed for Debian 8 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI008BLD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
FreeBSD 11 amd64 build: Failed (click for details) FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI009BUILD/config.status/config.status

Make failed for FreeBSD 11 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI009BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Fedora 29 amd64 build: Failed (click for details) Fedora 29 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/F29BUILD/config.status/config.status

Make failed for Fedora 29 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/F29BUILD/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
CentOS 7 amd64 build: Failed (click for details) CentOS 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI005BUILD/config.status/config.status

Make failed for CentOS 7 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/CI005BUILD/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
FreeBSD 12 amd64 build: Failed (click for details) FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/FBSD12AMD64/config.status/config.status

Make failed for FreeBSD 12 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/FBSD12AMD64/ErrorLog/log_make.txt)

  CC       lib/json.lo
  CC       lib/keychain.lo
  CC       lib/lib_errors.lo
  CC       lib/libfrr.lo
  CC       lib/linklist.lo
  CC       lib/log.lo
  CC       lib/md5.lo
  CC       lib/memory.lo
  CC       lib/memory_vty.lo
Ubuntu 18.04 amd64 build: Failed (click for details) Ubuntu 18.04 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804AMD64/config.status/config.status

Make failed for Ubuntu 18.04 amd64 build:
(see full Make log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7884/artifact/U1804AMD64/ErrorLog/log_make.txt)

  CC       bgpd/bgp_ecommunity.o
  CC       bgpd/bgp_encap_tlv.o
  CC       bgpd/bgp_errors.o
  CC       bgpd/bgp_evpn.o
  CLIPPY   bgpd/bgp_evpn_vty_clippy.c
  CC       bgpd/bgp_evpn_vty.o
  CC       bgpd/bgp_filter.o
  CC       bgpd/bgp_flowspec.o
  CC       bgpd/bgp_flowspec_util.o
Report for bgp_routemap.c | 9 issues
===============================================
< ERROR: strcpy() is error-prone; please use strlcpy()#4292: FILE: /tmp/f1-307/bgp_routemap.c:4292:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4267: FILE: /tmp/f2-307/bgp_routemap.c:4267:
370c379
< ERROR: strcpy() is error-prone; please use strlcpy()#4293: FILE: /tmp/f1-307/bgp_routemap.c:4293:
---
> ERROR: strcpy() is error-prone; please use strlcpy()#4268: FILE: /tmp/f2-307/bgp_routemap.c:4268:
374c383
< #4560: FILE: /tmp/f1-307/bgp_routemap.c:4560:

lkrishnamoor added a commit to lkrishnamoor/frr that referenced this pull request May 30, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH)
State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_NOOP)?
RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd.

We chose to go with RMAP_NOOP (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_NOOP
Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
@lkrishnamoor
Copy link
Contributor Author

@donaldsharp This PR has enum dependency from: #4315 (PR 4315 has to be merged before this) to get RMAP_NOOP.

Issue1: When "neighbor X.X.X.X route-map RM-VNI-FILTER in" is configured under evpn address-family,
all the received routes are dropped regardless of whether the route has a matching vni or not.

Issue2: Routes with 2 labels are not filtered correctly

Issue3: Interpreting the label based on tunnel type, vxlan was not done correctly.
Vxlan label has 24 bits, whereas, MPLS label is 20 bits long

Fix1: The handler bgp_update() that services the received route ignored the route's label while deciding whether to filter it or not. As part of the fix, the handler now uses the label info to make the decision about whether to filter the route or not.

Fix2: route_match_vni() now tries to match both the labels within the route, not just the one.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
@lkrishnamoor lkrishnamoor reopened this May 31, 2019
@lkrishnamoor
Copy link
Contributor Author

CI:rerun

@lkrishnamoor
Copy link
Contributor Author

@donaldsharp @srimohans @qlyoung
This diff is ready to go!!

@LabN-CI
Copy link
Collaborator

LabN-CI commented May 31, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4078 e241544
Date 05/31/2019
Start 13:35:47
Finish 13:58:32
Run-Time 22:45
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-05-31-13:35:47.txt
Log autoscript-2019-05-31-13:36:51.log.bz2
Memory 434 421 362

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7907/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA 4cc1365

No Changes in Static Analysis warnings compared to base

11 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7907/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7906/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 4078, comparing to Git base SHA 4cc1365

No Changes in Static Analysis warnings compared to base

11 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-7906/artifact/shared/static_analysis/index.html

@donaldsharp donaldsharp merged commit 61b64d5 into FRRouting:master Jun 3, 2019
qlyoung pushed a commit to qlyoung/frr that referenced this pull request Aug 8, 2019
Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH)
State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (FRRouting#4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_NOOP)?
RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd.

We chose to go with RMAP_NOOP (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_NOOP
Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants