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

zebra: giant zapi cleanup #1828

Merged
merged 10 commits into from
Mar 13, 2018
Merged

zebra: giant zapi cleanup #1828

merged 10 commits into from
Mar 13, 2018

Conversation

qlyoung
Copy link
Member

@qlyoung qlyoung commented Mar 5, 2018

Standardize arguments for ZAPI message handlers

A lot of the handler functions that are called directly from the ZAPI
input processing code take different argument sets where they don't need
to. These functions are called from only one place and all have the same
fundamental information available to them to do their work. There is no
need to specialize what information is passed to them; it is cleaner and
easier to understand when they all accept the same base set of
information and extract what they need inline.

Eliminate the humongous switch-case in the dispatcher

After doing the above work it becomes possible to eliminate the big
switch-case statement and turn it into a lookup table keyed by ZAPI
message code. Granted the compiler usually optimizes switch-case
statements into jump tables anyway but it is better to make this a
strong guarantee by doing it in the source.

Allow batching ZAPI I/O

ZAPI's original I/O loop looks like:

zserv_read:

  • Read one message
  • Run message handler
  • Schedule zserv_read

This has been changed to:

zserv_handle_messages:

  • For each message on the input queue:
    • Pop the message
    • Run message handler

zserv_read:

  • Read as many messages as available into input queue
  • Schedule zserv_handle_messages
  • Schedule zserv_read

This is more flexible as it decouples I/O from actual state changes inside
Zebra. Theoretically it also helps cache churn by grouping the same tasks
together instead of alternating between them.

Modify all handlers to stop accessing global client buffers

There is no reason for message handlers to look at a global data
structure that holds the last message received. Instead we can reduce
the amount of global state they need to know about by making them accept
a message stream, and not care about where it came from. This is also
necessary for the input queue changes above. It also moves us closer to
being able to unit test ZAPI message handlers.

Modify all handlers to not return an status code

All of the ZAPI message handlers return an integer that means different
things to each of them, but nobody ever reads these integers, so this is
technical debt that we can just eliminate outright.

Rename some functions to zread_* or zsend_* to clarify action

zserv.c functions are roughly organized into three kinds of functions:

  • Functions that encode Zebra datastructures into ZAPI message
    equivalents
  • Functions that build and send whole messages
  • Functions that process received ZAPI messages

These are variously named with prefixes like "zserv", "zebra", "zread",
"zsend", etc. Organize them by using consistent naming prefixes;
zserv_encode_*, zsend_*, zread_* respectively for the three types given
above.

Organize zserv.c into logical sections

Group the above functions together by type, and group the plumbing for
the I/O code together as well.

Add struct zmsghdr

Formalize the ZAPI header by documenting it in code and providing it to
message handlers free of charge to reduce complexity.

Clean up zserv_read

Just some simplifications of the existing code intended to make it
easier to read, understand and debug. Also improved debugging output for
ZAPI messages by leveraging zmsghdr and making log messages consistent:

2018/03/05 16:00:12 OSPF: ospfd 4.1-dev starting: vty@2604
2018/03/05 16:00:12 ZEBRA: zebra message comes from socket [19]
2018/03/05 16:00:12 ZEBRA: Rx'd ZAPI message
2018/03/05 16:00:12 ZEBRA:  Length: 4
2018/03/05 16:00:12 ZEBRA: Command: ZEBRA_HELLO
2018/03/05 16:00:12 ZEBRA:     VRF: 0
2018/03/05 16:00:12 ZEBRA:
0x0000000001773ad0: 00 0e fe 05             ....

2018/03/05 16:00:12 ZEBRA: Read 1 packets
2018/03/05 16:00:12 ZEBRA: client 19 says hello and bids fair to announce only ospf routes
2018/03/05 16:00:12 ZEBRA: zebra message comes from socket [19]
2018/03/05 16:00:12 ZEBRA: Rx'd ZAPI message
2018/03/05 16:00:12 ZEBRA:  Length: 4
2018/03/05 16:00:12 ZEBRA: Command: ZEBRA_BFD_CLIENT_REGISTER
2018/03/05 16:00:12 ZEBRA:     VRF: 0
2018/03/05 16:00:12 ZEBRA:
0x0000000001773ad0: 00 0e fe 05             ....

2018/03/05 16:00:12 ZEBRA: Read 1 packets
2018/03/05 16:00:12 ZEBRA: bfd_client_register msg from client ospf: length=14
2018/03/05 16:00:12 ZEBRA: zebra message comes from socket [19]
2018/03/05 16:00:12 ZEBRA: Rx'd ZAPI message
2018/03/05 16:00:12 ZEBRA:  Length: 0
2018/03/05 16:00:12 ZEBRA: Command: ZEBRA_ROUTER_ID_ADD
2018/03/05 16:00:12 ZEBRA:     VRF: 0
2018/03/05 16:00:12 ZEBRA:

2018/03/05 16:00:12 ZEBRA: Read 1 packets
2018/03/05 16:00:12 ZEBRA: zebra message comes from socket [19]
2018/03/05 16:00:12 ZEBRA: Rx'd ZAPI message
2018/03/05 16:00:12 ZEBRA:  Length: 0
2018/03/05 16:00:12 ZEBRA: Command: ZEBRA_INTERFACE_ADD
2018/03/05 16:00:12 ZEBRA:     VRF: 0
2018/03/05 16:00:12 ZEBRA:

Signed-off-by: Quentin Young qlyoung@cumulusnetworks.com

@FRRouting FRRouting deleted a comment from NetDEF-CI Mar 5, 2018
@FRRouting FRRouting deleted a comment from LabN-CI Mar 5, 2018
@qlyoung
Copy link
Member Author

qlyoung commented Mar 5, 2018

Need to leave stream_failure labels defined even when they are unused; in this case we have to put a return statement at the end of the function. The style checker will warn about this since usually return statements at the end of a function are unnecessary, but these warnings can be safely ignored. It will also warn that ZAPI_HANDLER_ARGS needs an identifier name, but this is a macro so this warning can also be ignored.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 5, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 be88e3d
Date 03/05/2018
Start 15:10:43
Finish 15:33:26
Run-Time 22:43
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-05-15:10:43.txt
Log autoscript-2018-03-05-15:11:24.log.bz2

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 5, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 df5df51
Date 03/05/2018
Start 16:05:41
Finish 16:29:31
Run-Time 23:50
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-05-16:05:41.txt
Log autoscript-2018-03-05-16:06:17.log.bz2

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-2747/

This is a comment from an EXPERIMENTAL 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 redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #63: FILE: /tmp/f1/zebra_vxlan.h:63:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 6d9f706

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

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

@FRRouting FRRouting deleted a comment from NetDEF-CI Mar 5, 2018
@qlyoung
Copy link
Member Author

qlyoung commented Mar 5, 2018

Deleted spurious comment generated by a broken rebase.

@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-2749/

This is a comment from an EXPERIMENTAL 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 redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #63: FILE: /tmp/f1/zebra_vxlan.h:63:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 6d9f706

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2749/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-2748/

This is a comment from an EXPERIMENTAL 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 label_manager.c
===============================================
WARNING: externs should be avoided in .c files
#44: FILE: /tmp/f1/label_manager.c:44:
+extern struct zebra_privs_t zserv_privs;

ERROR: Bad function definition - void label_manager_close() should probably be void label_manager_close(void)
#387: FILE: /tmp/f1/label_manager.c:387:
+void label_manager_close()
Report for redistribute.c
===============================================
WARNING: Missing a blank line after declarations
#114: FILE: /tmp/f1/redistribute.c:114:
+			struct prefix *dst_p, *src_p;
+			srcdest_rnode_prefixes(rn, &dst_p, &src_p);
--
WARNING: quoted string split across lines
#119: FILE: /tmp/f1/redistribute.c:119:
+					"%s: checking: selected=%d, type=%d, distance=%d, "
+					"zebra_check_addr=%d",
--
WARNING: __func__ should be used instead of gcc specific __FUNCTION__
#164: FILE: /tmp/f1/redistribute.c:164:
+			  __FUNCTION__);

WARNING: __func__ should be used instead of gcc specific __FUNCTION__
#225: FILE: /tmp/f1/redistribute.c:225:
+			  __FUNCTION__);

WARNING: braces {} are not necessary for single statement blocks
#365: FILE: /tmp/f1/redistribute.c:365:
+	for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client)) {
+		zsend_interface_update(ZEBRA_INTERFACE_DOWN, client, ifp);
--
WARNING: Block comments use a trailing */ on a separate line
#477: FILE: /tmp/f1/redistribute.c:477:
+		 * VRF. */

ERROR: space required after that ',' (ctx:VxV)
#542: FILE: /tmp/f1/redistribute.c:542:
+	newre = XCALLOC(MTYPE_RE,sizeof(struct route_entry));
 	                        ^
--
ERROR: Bad function definition - void zebra_import_table_rm_update() should probably be void zebra_import_table_rm_update(void)
#685: FILE: /tmp/f1/redistribute.c:685:
+void zebra_import_table_rm_update()

WARNING: void function return statements are not generally useful
#736: FILE: /tmp/f1/redistribute.c:736:
+	return;
+}
Report for redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #63: FILE: /tmp/f1/zebra_vxlan.h:63:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 6d9f706

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

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

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 6, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 308764f
Date 03/06/2018
Start 18:35:41
Finish 18:58:44
Run-Time 23:03
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-06-18:35:41.txt
Log autoscript-2018-03-06-18:36:17.log.bz2

For details, please contact louberger

zebra/zserv.c Outdated
@@ -2569,11 +2569,32 @@ static void zread_vrf_label(struct zserv *client,
return;
}

/*
Copy link
Member

@donaldsharp donaldsharp Mar 7, 2018

Choose a reason for hiding this comment

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

This is zclient_read_header?

To clarify I would prefer this is a library function that provides the struct zmsghdr * instead of this in zserv.c because I think all protocols can and should take advanatage of this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense

zebra/zserv.c Outdated
return;
}

while (l < length) {
while (l < hdr->length) {
Copy link
Member

Choose a reason for hiding this comment

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

as a question -> the decode function ( that I commented on in the previous commit ) does not take into account subtraction of the zapi header. Is this going to be a problem here?

Copy link
Member Author

@qlyoung qlyoung Mar 7, 2018

Choose a reason for hiding this comment

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

No, the handler functions expect the stream pointer to be at the first byte after the header.
zserv_process_messages resets the stream pointer and then extracts the header before calling down to the handlers, so they get the offset they expect. The length field of the header doesn't include the header itself.

Copy link
Member

Choose a reason for hiding this comment

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

did you subtract it out because it typically does include the length of the header (see the lib/zclient.c code )

@FRRouting FRRouting deleted a comment from NetDEF-CI Mar 7, 2018
@qlyoung
Copy link
Member Author

qlyoung commented Mar 7, 2018

Rebase

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 7, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 64ffa06
Date 03/07/2018
Start 11:55:46
Finish 12:18:31
Run-Time 22:45
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-07-11:55:46.txt
Log autoscript-2018-03-07-11:56:22.log.bz2

For details, please contact louberger

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 7, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 2e70e51
Date 03/07/2018
Start 13:19:47
Finish 13:42:34
Run-Time 22:47
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-07-13:19:47.txt
Log autoscript-2018-03-07-13:20:24.log.bz2

For details, please contact louberger

@rwestphal
Copy link
Member

Great work. While reviewing this, I found out that the NetDEF CI is stuck in an infinite loop inside one topotest (test_ldp_vpls_topo1.py). This is happening because zebra is crashing when it is configured with the debug zebra packet command. Here's the backtrace:

#0  0x00007ffff7b5bd61 in zlog_hexdump (mem=0x3535353535303030, len=813182986) at lib/log.c:1103
#1  0x00005555555c9460 in zserv_log_message (errmsg=0x0, msg=0x555555956150, hdr=0x7fffffffe5a4) at zebra/zserv.c:2585
#2  0x00005555555c9cbf in zserv_read (thread=0x7fffffffe770) at zebra/zserv.c:2846
#3  0x00007ffff7b88702 in thread_call (thread=0x7fffffffe770) at lib/thread.c:1497
#4  0x00007ffff7b58258 in frr_run (master=0x5555558085a0) at lib/libfrr.c:879
#5  0x000055555557d4dd in main (argc=1, argv=0x7fffffffea28) at zebra/main.c:377

@rwestphal
Copy link
Member

The problem seems to be in the zlog_hexdump() function itself, which was not touched by this PR. The diff below fixed the crash for me:

@@ -1089,7 +1089,7 @@ void zlog_hexdump(const void *mem, unsigned int len)
        unsigned long i = 0;
        unsigned int j = 0;
        unsigned int columns = 8;
-       char buf[(len * 4) + ((len / 4) * 20) + 30];
+       char buf[BUFSIZ];
        char *s = buf;
 
        for (i = 0; i < len + ((len % columns) ? (columns - len % columns) : 0);

As odd as it looks, variable length arrays are valid in C99. Changing the size of the array to (len * 4) + ((len * 20) / 4) + 30 also fixed the crash, apparently the problem was the truncation from len / 4.

However my LDP test topology is still not working because zebra is somehow droping the routes received from ospfd and ospf6d. I'll keep investigating.

lib/zclient.c Outdated
STREAM_GETW(zmsg, hdr->length);
STREAM_GETC(zmsg, hdr->marker);
STREAM_GETC(zmsg, hdr->version);
STREAM_GETC(zmsg, hdr->vrf_id);
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be STREAM_GETL().

Copy link
Member

@rwestphal rwestphal left a comment

Choose a reason for hiding this comment

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

Fantastic work, I'll merge it once CI passes (please see my inline comments as well).

One thing I noticed is that we now need to allocate a new stream structure every time we send/receive a packet to/from a client. But I believe this overhead shouldn't be noticeable even under big loads. I think it's a price we pay to allow the implementation of a ZAPI I/O thread in the future, so IMO it's a good trade-off.

zebra/zserv.c Outdated
struct zmsghdr hdr;
ssize_t nb;
bool hdrvalid;
char errmsg[256];
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think you could declare these four variables inside the while loop below to reduce their scope.

Copy link
Member Author

Choose a reason for hiding this comment

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

fair enough

const char *emsg = "Message has corrupt header";
zserv_log_message(emsg, msg, NULL);
}
if (!hdrvalid)
Copy link
Member

Choose a reason for hiding this comment

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

I see that here and in several other places you're using this idiom to reduce one level of code indentation:

if (a && debug) {
    zlog(...);
}
if (a) {
    // process error
}

Instead of doing this:

if (a) {
    if (debug) {
        zlog(...);
    }
    // process error
}

I'm not sure if I like this. I think the second option reads better and is easier to follow (performance-wise they should be the same when using modern compilers). Reducing indentation levels usually improves code readability, but I don't see this happening here (my personal opinion).

Copy link
Member Author

@qlyoung qlyoung Mar 9, 2018

Choose a reason for hiding this comment

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

Yeah I tried it the second way and it really crams it in there to fit under 80 characters. I would like to simplify this code some more so there's less indentation but I thought it was more readable the way I have it. I agree it's less than ideal and our ideas of 'readable' differ, I don't care too much either way and will change it back.

@@ -87,7 +89,7 @@ static int relay_response_back(struct zserv *zserv)

/* send response back */
stream_copy(dst, src);
ret = writen(zserv->sock, dst->data, stream_get_endp(dst));
ret = writen(zserv->sock, src->data, stream_get_endp(src));
Copy link
Member

Choose a reason for hiding this comment

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

was this change intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was at a previous version of this PR, not anymore. As I read it there's no difference either way. I can back it out if you like.

/* process commands */
zserv_handle_commands(client, &hdr, msg, zvrf);

} while (msg);
Copy link
Member

Choose a reason for hiding this comment

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

In zebra_client_read() we read up to zebrad.packets_to_process packets at time. Wouldn't it be a good idea to have a limit like that here as well? I think it will be necessary especially when the ZAPI I/O is segregated into another thread reading packets non-stop. And instead of zebrad.packets_to_process we could try using thread_should_yield() but I'm not sure if it would work.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct, I have code for this on my multithreaded ZAPI branch. I can pull it into this PR if you think it belongs here.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, adding a limit later together with the MT ZAPI code sounds reasonable to me.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 9, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git pull/1828 b703365 (merge failed)
Date 03/09/2018
Start 16:05:10
Finish 16:28:10
Run-Time 23:00
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-09-16:05:10.txt
Log autoscript-2018-03-09-16:05:47.log.bz2

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-2826/

This is a comment from an EXPERIMENTAL 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 and apply patch from patchwork: Successful

Building Stage: Successful

Basic Tests: Failed

Ubuntu 14.04 deb pkg check: Successful
Addresssanitizer topotest: Successful
Debian 8 deb pkg check: Successful
Fedora 24 rpm pkg check: Successful
Debian 9 deb pkg check: Successful
CentOS 7 rpm pkg check: Successful
Ubuntu 12.04 deb pkg check: Successful
Static analyzer (clang): Successful
CentOS 6 rpm pkg check: Successful
Ubuntu 16.04 deb pkg check: Successful

IPv4 ldp protocol on Ubuntu 16.04: Failed

RFC Compliance Test ANVL-LDP-1.24 failing:
Test Summary
Send DUT labelled data which DUT should forward
Test Reference
Setup Verification
Test Classification
MUST
Test ANVL-LDP-1.24: !FAILED!
Peer 192.168.0.101 did not forward MPLS packet with label 16

RFC Compliance Test ANVL-LDP-26.8 failing:
Test Summary
An LSR configured for Independent Control and Downstream Unsolicited
mode sends a mapping message when the LSR recognizes a new FEC via the
forwarding table.
Test Reference
RFC 3036, s3.5.7.1.1 p67 Independent Control Mapping
Test Classification
MUST
Test ANVL-LDP-26.8: !FAILED!
Did not receive Label Mapping for FEC 172.16.12.0/24

Topology tests on Ubuntu 16.04 amd64: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2826/test

Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 16152]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f077c1e3428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#0  0x00007f077c1e3428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f077c1e502a in __GI_abort () at abort.c:89
#2  0x00007f077cbf623a in core_handler (signo=11, siginfo=0x7ffe56254c70, context=0x7ffe56254b40) at lib/sigevent.c:249
#3  <signal handler called>
#4  0x00007f077cbe37e2 in snprintf (__fmt=0x7f077cc1c011 "%02x ", __n=18446744073709551593, __s=0x7ffe56255183 "") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:64
#5  zlog_hexdump (mem=0x55d6fb2483a0, len=30) at lib/log.c:1105
#6  0x000055d6f93cbbe9 in zserv_log_message (errmsg=errmsg@entry=0x0, msg=<optimized out>, hdr=hdr@entry=0x7ffe56255200) at zebra/zserv.c:2585
#7  0x000055d6f93cd3be in zserv_read (thread=<optimized out>) at zebra/zserv.c:2846
#8  0x00007f077cc028d0 in thread_call (thread=thread@entry=0x7ffe56255500) at lib/thread.c:1497
#9  0x00007f077cbe04f8 in frr_run (master=0x55d6fb07b5d0) at lib/libfrr.c:879
#10 0x000055d6f938b1fd in main (argc=1, argv=0x7ffe562557e8) at zebra/main.c:377

2018-03-09 13:33:20,510 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOU1604/ErrorLog/log_topotests.txt

IPv4 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-OSPF-3.1 failing:
Test Summary
This routing table entry then provides the outgoing interface
and next hop router to use in forwarding the packet.
(NOTE: Here we are testing the DUT forwards IP packet to the
correct interface and next hop based on an entry in the
OSPF routing table.)
Test Reference
RFC 1583, s11.1 p96 Routing table lookup
RFC 2328, s11.1 p111 Routing table lookup
Test Classification
MUST
Test ANVL-OSPF-3.1: !FAILED!
Unable to establish adjacency with router ID 192.168.0.101

RFC Compliance Test ANVL-OSPF-31.2 failing:
Test Summary
A self-originated LSA is detected when the LSA is a network-LSA and
its Link State ID is equal to one of the router's own IP interface
addresses. In this case the LSA is flushed from the routing domain.
Test Reference
RFC 2328, s13.4 p151 Receiving self-originated LSAs
Test Classification
MUST
Test ANVL-OSPF-31.2: !FAILED!
Unable to establish OSPF adjacency between DUT router ID 192.168.0.101 and
ANVL Router Router A (192.168.1.1) to state Full

RFC Compliance Test ANVL-BGP4-1.3 failing:
Test Summary
Router adds routes contained in the newly received Update Message to
its routing table
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.3: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected
IP packet forwarded by DUT

RFC Compliance Test ANVL-BGP4-1.4 failing:
Test Summary
Router forwards new Update routes
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.4: !FAILED!
External peer did not receive expected BGP4
Update Message from

RFC Compliance Test ANVL-BGP4-4.1 failing:
Test Summary
An UPDATE message MAY simultaneously advertise a feasible route and
withdraw multiple unfeasible routes from service.
Test Reference
RFC4271, Sect. 4.3, p 15,
UPDATE Message Format
Test Classification
MAY
Test ANVL-BGP4-4.1: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected IP packet
forwarded by DUT

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2826/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2018-03-09 13:30:42,560 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_convergence": BGP router network did not converge
assert json["ipv4Unicast"]["peers"]["10.0.1.101"]["state"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -"Established"
  +"Idle")
  json["ipv4Unicast"]["peers"]["10.0.1.101"]["prefixReceivedCount"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -10
  +0)
2018-03-09 13:30:45,782 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_vrf_netns": expected routes in "show ip bgp vrf r1-cust1 ipv4" output
assert expected key(s) ['10.201.3.0/24', '10.201.6.0/24', '10.201.5.0/24', '10.201.8.0/24', '10.201.9.0/24', '10.201.0.0/24', '10.201.2.0/24', '10.201.1.0/24', '10.201.4.0/24', '10.201.7.0/24'] in json["routes"] (have []):
  --- Expected value
  +++ Current value
  @@ -1,52 +1 @@
  -{
  -    "10.201.0.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.1.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.2.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.3.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.4.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.5.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.6.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.7.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.8.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.9.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ]
  -}
  +{}
r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 26501]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb7f4dce5 in ?? ()
#0  0xb7f4dce5 in ?? ()
#1  <signal handler called>
#2  0xb7ed94ff in zlog_hexdump (mem=0x12a18d0, len=81) at lib/log.c:1119
#3  0x004c207c in zserv_log_message (errmsg=errmsg@entry=0x0, msg=0x12a09d8, hdr=hdr@entry=0xbfe9eb20) at zebra/zserv.c:2585
#4  0x004c39e8 in zserv_read (thread=0xbfe9ed50) at zebra/zserv.c:2846
#5  0xb7ef95f9 in thread_call (thread=0xbfe9ed50) at lib/thread.c:1497
#6  0xb7ed6279 in frr_run (master=0x11a4f70) at lib/libfrr.c:879
#7  0x0047e628 in main (argc=1, argv=0xbfe9ef84) at zebra/main.c:377

2018-03-09 13:33:50,106 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOI386/ErrorLog/log_topotests.txt

IPv6 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-RIPNG-1.4 failing:
Test Summary
DUT forwards the packet according to routing table entry.
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-RIPNG-1.4: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-RIPNG-3.2 failing:
Test Summary
The route tag in the next hop RTE must be ignored on reception.
(Note : Prefix Length is set to zero but route tag set to non-zero
so DUT must ignore this non-zero value)
Test Reference
NEGATIVE
RFC 2080 s2.1.1 p7 Next Hop
Test Classification
MUST
Test ANVL-RIPNG-3.2: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-OSPFV3-16.6 failing:
Test Summary
If the two instances of a LSA have identical LS sequence number
and LS Checksum and none of them is of age MaxAge then if their
ages differ by more than MaxAgeDiff, the instance having the
smaller age is accepted as most recent.
Test Reference
RFC 5340, s4.4.1 p23 The LSA Header
RFC 2328, s12.1.1 p117 LS age
Test Classification
MUST
Test ANVL-OSPFV3-16.6: !FAILED!
Did not receive expected IPv6 packet

RFC Compliance Test ANVL-BGPPLUS-AS4-4.1 failing:
Test Summary
When communicating with an OLD BGP speaker, a NEW speaker MUST send
the AS path information in the AS_PATH attribute encoded with 2-octet
AS numbers.
Test Reference
RFC4893 Section 4.2.2 Page 4 'Generating Updates'
Test Classification
MUST
Test ANVL-BGPPLUS-AS4-4.1: !FAILED!
External peer did not receive expected
BGP4 Update Message from DUT

Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOU1604/MemoryLeaks/
Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOI386/MemoryLeaks/

Warnings Generated during build:

Checkout code: Successful with additional warnings:

IPv4 ldp protocol on Ubuntu 16.04: Failed

RFC Compliance Test ANVL-LDP-1.24 failing:
Test Summary
Send DUT labelled data which DUT should forward
Test Reference
Setup Verification
Test Classification
MUST
Test ANVL-LDP-1.24: !FAILED!
Peer 192.168.0.101 did not forward MPLS packet with label 16

RFC Compliance Test ANVL-LDP-26.8 failing:
Test Summary
An LSR configured for Independent Control and Downstream Unsolicited
mode sends a mapping message when the LSR recognizes a new FEC via the
forwarding table.
Test Reference
RFC 3036, s3.5.7.1.1 p67 Independent Control Mapping
Test Classification
MUST
Test ANVL-LDP-26.8: !FAILED!
Did not receive Label Mapping for FEC 172.16.12.0/24

Topology tests on Ubuntu 16.04 amd64: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2826/test

Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 16152]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f077c1e3428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#0  0x00007f077c1e3428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f077c1e502a in __GI_abort () at abort.c:89
#2  0x00007f077cbf623a in core_handler (signo=11, siginfo=0x7ffe56254c70, context=0x7ffe56254b40) at lib/sigevent.c:249
#3  <signal handler called>
#4  0x00007f077cbe37e2 in snprintf (__fmt=0x7f077cc1c011 "%02x ", __n=18446744073709551593, __s=0x7ffe56255183 "") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:64
#5  zlog_hexdump (mem=0x55d6fb2483a0, len=30) at lib/log.c:1105
#6  0x000055d6f93cbbe9 in zserv_log_message (errmsg=errmsg@entry=0x0, msg=<optimized out>, hdr=hdr@entry=0x7ffe56255200) at zebra/zserv.c:2585
#7  0x000055d6f93cd3be in zserv_read (thread=<optimized out>) at zebra/zserv.c:2846
#8  0x00007f077cc028d0 in thread_call (thread=thread@entry=0x7ffe56255500) at lib/thread.c:1497
#9  0x00007f077cbe04f8 in frr_run (master=0x55d6fb07b5d0) at lib/libfrr.c:879
#10 0x000055d6f938b1fd in main (argc=1, argv=0x7ffe562557e8) at zebra/main.c:377

2018-03-09 13:33:20,510 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOU1604/ErrorLog/log_topotests.txt

IPv4 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-OSPF-3.1 failing:
Test Summary
This routing table entry then provides the outgoing interface
and next hop router to use in forwarding the packet.
(NOTE: Here we are testing the DUT forwards IP packet to the
correct interface and next hop based on an entry in the
OSPF routing table.)
Test Reference
RFC 1583, s11.1 p96 Routing table lookup
RFC 2328, s11.1 p111 Routing table lookup
Test Classification
MUST
Test ANVL-OSPF-3.1: !FAILED!
Unable to establish adjacency with router ID 192.168.0.101

RFC Compliance Test ANVL-OSPF-31.2 failing:
Test Summary
A self-originated LSA is detected when the LSA is a network-LSA and
its Link State ID is equal to one of the router's own IP interface
addresses. In this case the LSA is flushed from the routing domain.
Test Reference
RFC 2328, s13.4 p151 Receiving self-originated LSAs
Test Classification
MUST
Test ANVL-OSPF-31.2: !FAILED!
Unable to establish OSPF adjacency between DUT router ID 192.168.0.101 and
ANVL Router Router A (192.168.1.1) to state Full

RFC Compliance Test ANVL-BGP4-1.3 failing:
Test Summary
Router adds routes contained in the newly received Update Message to
its routing table
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.3: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected
IP packet forwarded by DUT

RFC Compliance Test ANVL-BGP4-1.4 failing:
Test Summary
Router forwards new Update routes
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.4: !FAILED!
External peer did not receive expected BGP4
Update Message from

RFC Compliance Test ANVL-BGP4-4.1 failing:
Test Summary
An UPDATE message MAY simultaneously advertise a feasible route and
withdraw multiple unfeasible routes from service.
Test Reference
RFC4271, Sect. 4.3, p 15,
UPDATE Message Format
Test Classification
MAY
Test ANVL-BGP4-4.1: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected IP packet
forwarded by DUT

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2826/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2018-03-09 13:30:42,560 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_convergence": BGP router network did not converge
assert json["ipv4Unicast"]["peers"]["10.0.1.101"]["state"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -"Established"
  +"Idle")
  json["ipv4Unicast"]["peers"]["10.0.1.101"]["prefixReceivedCount"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -10
  +0)
2018-03-09 13:30:45,782 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_vrf_netns": expected routes in "show ip bgp vrf r1-cust1 ipv4" output
assert expected key(s) ['10.201.3.0/24', '10.201.6.0/24', '10.201.5.0/24', '10.201.8.0/24', '10.201.9.0/24', '10.201.0.0/24', '10.201.2.0/24', '10.201.1.0/24', '10.201.4.0/24', '10.201.7.0/24'] in json["routes"] (have []):
  --- Expected value
  +++ Current value
  @@ -1,52 +1 @@
  -{
  -    "10.201.0.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.1.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.2.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.3.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.4.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.5.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.6.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.7.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.8.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.9.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ]
  -}
  +{}
r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 26501]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb7f4dce5 in ?? ()
#0  0xb7f4dce5 in ?? ()
#1  <signal handler called>
#2  0xb7ed94ff in zlog_hexdump (mem=0x12a18d0, len=81) at lib/log.c:1119
#3  0x004c207c in zserv_log_message (errmsg=errmsg@entry=0x0, msg=0x12a09d8, hdr=hdr@entry=0xbfe9eb20) at zebra/zserv.c:2585
#4  0x004c39e8 in zserv_read (thread=0xbfe9ed50) at zebra/zserv.c:2846
#5  0xb7ef95f9 in thread_call (thread=0xbfe9ed50) at lib/thread.c:1497
#6  0xb7ed6279 in frr_run (master=0x11a4f70) at lib/libfrr.c:879
#7  0x0047e628 in main (argc=1, argv=0xbfe9ef84) at zebra/main.c:377

2018-03-09 13:33:50,106 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2826/artifact/TOPOI386/ErrorLog/log_topotests.txt

IPv6 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-RIPNG-1.4 failing:
Test Summary
DUT forwards the packet according to routing table entry.
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-RIPNG-1.4: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-RIPNG-3.2 failing:
Test Summary
The route tag in the next hop RTE must be ignored on reception.
(Note : Prefix Length is set to zero but route tag set to non-zero
so DUT must ignore this non-zero value)
Test Reference
NEGATIVE
RFC 2080 s2.1.1 p7 Next Hop
Test Classification
MUST
Test ANVL-RIPNG-3.2: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-OSPFV3-16.6 failing:
Test Summary
If the two instances of a LSA have identical LS sequence number
and LS Checksum and none of them is of age MaxAge then if their
ages differ by more than MaxAgeDiff, the instance having the
smaller age is accepted as most recent.
Test Reference
RFC 5340, s4.4.1 p23 The LSA Header
RFC 2328, s12.1.1 p117 LS age
Test Classification
MUST
Test ANVL-OSPFV3-16.6: !FAILED!
Did not receive expected IPv6 packet

RFC Compliance Test ANVL-BGPPLUS-AS4-4.1 failing:
Test Summary
When communicating with an OLD BGP speaker, a NEW speaker MUST send
the AS path information in the AS_PATH attribute encoded with 2-octet
AS numbers.
Test Reference
RFC4893 Section 4.2.2 Page 4 'Generating Updates'
Test Classification
MUST
Test ANVL-BGPPLUS-AS4-4.1: !FAILED!
External peer did not receive expected
BGP4 Update Message from DUT

<stdin>:137: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
Report for nexthop_group_clippy.c
===============================================
WARNING: line over 80 characters
#1: FILE: /tmp/f1/nexthop_group_clippy.c:1:
+/* ecmp_nexthops => "[no] nexthop <A.B.C.D|X:X::X:X>$addr [INTERFACE]$intf [nexthop-vrf NAME$name]" */

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
#19: FILE: /tmp/f1/nexthop_group_clippy.c:19:
+	unsigned _fail = 0, _failcnt = 0;

WARNING: braces {} are not necessary for single statement blocks
#34: FILE: /tmp/f1/nexthop_group_clippy.c:34:
+		if (!strcmp(argv[_i]->varname, "no")) {
+			no = argv[_i]->arg;
--
WARNING: line over 80 characters
#41: FILE: /tmp/f1/nexthop_group_clippy.c:41:
+				_fail = !inet_pton(AF_INET6, argv[_i]->arg, &s__addr.sin6.sin6_addr);

WARNING: line over 80 characters
#45: FILE: /tmp/f1/nexthop_group_clippy.c:45:
+				_fail = !inet_aton(argv[_i]->arg, &s__addr.sin.sin_addr);

WARNING: braces {} are not necessary for single statement blocks
#49: FILE: /tmp/f1/nexthop_group_clippy.c:49:
+		if (!strcmp(argv[_i]->varname, "intf")) {
+			intf = argv[_i]->arg;
--
WARNING: braces {} are not necessary for single statement blocks
#52: FILE: /tmp/f1/nexthop_group_clippy.c:52:
+		if (!strcmp(argv[_i]->varname, "name")) {
+			name = argv[_i]->arg;
--
WARNING: space prohibited between function name and open parenthesis '('
#57: FILE: /tmp/f1/nexthop_group_clippy.c:57:
+			vty_out (vty, "%% invalid input for %s: %s\n",

WARNING: line over 80 characters
#67: FILE: /tmp/f1/nexthop_group_clippy.c:67:
+	return ecmp_nexthops_magic(self, vty, argc, argv, no, addr, addr_str, intf, name);
Report for redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zclient.h
===============================================
< WARNING: line over 80 characters
< #502: FILE: /tmp/f1/zclient.h:502:
< +CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #56: FILE: /tmp/f1/zebra_vxlan.h:56:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 54085ea

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

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

@qlyoung
Copy link
Member Author

qlyoung commented Mar 9, 2018

@rwestphal Fixed a couple of the nits you mentioned. In zlog_hexdump I opted to use the order of operations that's not prone to truncation error instead of BUFSIZ, since it's plausible that someone will want to hexdump more data than BUFSIZ can hold at some point in the future. I also changed all the sprintf's in that function to snprintf's just to be safe. Did the STREAM_GETC --> STREAM_GETL change and rebased on master. Should be g2g now.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 9, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1828 55519c6
Date 03/09/2018
Start 17:50:51
Finish 18:13:40
Run-Time 22:49
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-09-17:50:51.txt
Log autoscript-2018-03-09-17:51:31.log.bz2

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-2829/

This is a comment from an EXPERIMENTAL 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 and apply patch from patchwork: Successful

Building Stage: Successful

Basic Tests: Failed

Fedora 24 rpm pkg check: Successful
Addresssanitizer topotest: Successful
Debian 8 deb pkg check: Successful
CentOS 7 rpm pkg check: Successful
Debian 9 deb pkg check: Successful
Ubuntu 14.04 deb pkg check: Successful
Static analyzer (clang): Successful
CentOS 6 rpm pkg check: Successful
Ubuntu 16.04 deb pkg check: Successful
Ubuntu 12.04 deb pkg check: Successful

Topology tests on Ubuntu 16.04 amd64: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2829/test

Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 27863]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f076e7e2428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#0  0x00007f076e7e2428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f076e7e402a in __GI_abort () at abort.c:89
#2  0x00007f076f1f55ca in core_handler (signo=11, siginfo=0x7ffdea36fe30, context=0x7ffdea36fd00) at lib/sigevent.c:249
#3  <signal handler called>
#4  0x00007f076f1e2b12 in snprintf (__fmt=0x7f076f21b631 "%02x ", __n=18446744073709551583, __s=0x7ffdea370433 "") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:64
#5  zlog_hexdump (mem=0x5614f00686c0, len=81) at lib/log.c:1108
#6  0x00005614ee107cd9 in zserv_log_message (errmsg=errmsg@entry=0x0, msg=<optimized out>, hdr=hdr@entry=0x7ffdea3704b0) at zebra/zserv.c:2691
#7  0x00005614ee1094ae in zserv_read (thread=<optimized out>) at zebra/zserv.c:2952
#8  0x00007f076f201c60 in thread_call (thread=thread@entry=0x7ffdea3707b0) at lib/thread.c:1497
#9  0x00007f076f1df828 in frr_run (master=0x5614efe955d0) at lib/libfrr.c:879
#10 0x00005614ee0c69fd in main (argc=1, argv=0x7ffdea370a98) at zebra/main.c:377

2018-03-09 15:20:09,022 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOU1604/ErrorLog/log_topotests.txt

IPv4 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-OSPF-3.1 failing:
Test Summary
This routing table entry then provides the outgoing interface
and next hop router to use in forwarding the packet.
(NOTE: Here we are testing the DUT forwards IP packet to the
correct interface and next hop based on an entry in the
OSPF routing table.)
Test Reference
RFC 1583, s11.1 p96 Routing table lookup
RFC 2328, s11.1 p111 Routing table lookup
Test Classification
MUST
Test ANVL-OSPF-3.1: !FAILED!
Unable to establish adjacency with router ID 192.168.0.101

RFC Compliance Test ANVL-OSPF-31.2 failing:
Test Summary
A self-originated LSA is detected when the LSA is a network-LSA and
its Link State ID is equal to one of the router's own IP interface
addresses. In this case the LSA is flushed from the routing domain.
Test Reference
RFC 2328, s13.4 p151 Receiving self-originated LSAs
Test Classification
MUST
Test ANVL-OSPF-31.2: !FAILED!
Unable to establish OSPF adjacency between DUT router ID 192.168.0.101 and
ANVL Router Router A (192.168.1.1) to state Full

RFC Compliance Test ANVL-BGP4-1.3 failing:
Test Summary
Router adds routes contained in the newly received Update Message to
its routing table
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.3: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected
IP packet forwarded by DUT

RFC Compliance Test ANVL-BGP4-1.4 failing:
Test Summary
Router forwards new Update routes
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.4: !FAILED!
External peer did not receive expected BGP4
Update Message from

RFC Compliance Test ANVL-BGP4-4.1 failing:
Test Summary
An UPDATE message MAY simultaneously advertise a feasible route and
withdraw multiple unfeasible routes from service.
Test Reference
RFC4271, Sect. 4.3, p 15,
UPDATE Message Format
Test Classification
MAY
Test ANVL-BGP4-4.1: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected IP packet
forwarded by DUT

IPv4 ldp protocol on Ubuntu 16.04: Failed

RFC Compliance Test ANVL-LDP-1.24 failing:
Test Summary
Send DUT labelled data which DUT should forward
Test Reference
Setup Verification
Test Classification
MUST
Test ANVL-LDP-1.24: !FAILED!
Peer 192.168.0.101 did not forward MPLS packet with label 16

RFC Compliance Test ANVL-LDP-26.8 failing:
Test Summary
An LSR configured for Independent Control and Downstream Unsolicited
mode sends a mapping message when the LSR recognizes a new FEC via the
forwarding table.
Test Reference
RFC 3036, s3.5.7.1.1 p67 Independent Control Mapping
Test Classification
MUST
Test ANVL-LDP-26.8: !FAILED!
Did not receive Label Mapping for FEC 172.16.12.0/24

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2829/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 16550]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb7fd9ce5 in ?? ()
#0  0xb7fd9ce5 in ?? ()
#1  <signal handler called>
#2  0xb7f64679 in snprintf (__fmt=0xb7f9ed01 "%02x ", __n=4294967258, __s=0xbfc1f222 "") at /usr/include/i386-linux-gnu/bits/stdio2.h:64
#3  zlog_hexdump (mem=0xa8daa0, len=30) at lib/log.c:1108
#4  0x0046ad3c in zserv_log_message (errmsg=errmsg@entry=0x0, msg=0xa85a30, hdr=hdr@entry=0xbfc1f2d0) at zebra/zserv.c:2691
#5  0x0046c6a8 in zserv_read (thread=0xbfc1f500) at zebra/zserv.c:2952
#6  0xb7f848c9 in thread_call (thread=0xbfc1f500) at lib/thread.c:1497
#7  0xb7f614c9 in frr_run (master=0x989f70) at lib/libfrr.c:879
#8  0x00426938 in main (argc=1, argv=0xbfc1f734) at zebra/main.c:377

2018-03-09 15:20:01,985 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOI386/ErrorLog/log_topotests.txt

IPv6 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-RIPNG-1.4 failing:
Test Summary
DUT forwards the packet according to routing table entry.
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-RIPNG-1.4: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-RIPNG-3.2 failing:
Test Summary
The route tag in the next hop RTE must be ignored on reception.
(Note : Prefix Length is set to zero but route tag set to non-zero
so DUT must ignore this non-zero value)
Test Reference
NEGATIVE
RFC 2080 s2.1.1 p7 Next Hop
Test Classification
MUST
Test ANVL-RIPNG-3.2: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-OSPFV3-16.6 failing:
Test Summary
If the two instances of a LSA have identical LS sequence number
and LS Checksum and none of them is of age MaxAge then if their
ages differ by more than MaxAgeDiff, the instance having the
smaller age is accepted as most recent.
Test Reference
RFC 5340, s4.4.1 p23 The LSA Header
RFC 2328, s12.1.1 p117 LS age
Test Classification
MUST
Test ANVL-OSPFV3-16.6: !FAILED!
Did not receive expected IPv6 packet

RFC Compliance Test ANVL-BGPPLUS-AS4-4.1 failing:
Test Summary
When communicating with an OLD BGP speaker, a NEW speaker MUST send
the AS path information in the AS_PATH attribute encoded with 2-octet
AS numbers.
Test Reference
RFC4893 Section 4.2.2 Page 4 'Generating Updates'
Test Classification
MUST
Test ANVL-BGPPLUS-AS4-4.1: !FAILED!
External peer did not receive expected
BGP4 Update Message from DUT

Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOU1604/MemoryLeaks/
Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOI386/MemoryLeaks/

Warnings Generated during build:

Checkout code: Successful with additional warnings:

Topology tests on Ubuntu 16.04 amd64: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-2829/test

Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 27863]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007f076e7e2428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#0  0x00007f076e7e2428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007f076e7e402a in __GI_abort () at abort.c:89
#2  0x00007f076f1f55ca in core_handler (signo=11, siginfo=0x7ffdea36fe30, context=0x7ffdea36fd00) at lib/sigevent.c:249
#3  <signal handler called>
#4  0x00007f076f1e2b12 in snprintf (__fmt=0x7f076f21b631 "%02x ", __n=18446744073709551583, __s=0x7ffdea370433 "") at /usr/include/x86_64-linux-gnu/bits/stdio2.h:64
#5  zlog_hexdump (mem=0x5614f00686c0, len=81) at lib/log.c:1108
#6  0x00005614ee107cd9 in zserv_log_message (errmsg=errmsg@entry=0x0, msg=<optimized out>, hdr=hdr@entry=0x7ffdea3704b0) at zebra/zserv.c:2691
#7  0x00005614ee1094ae in zserv_read (thread=<optimized out>) at zebra/zserv.c:2952
#8  0x00007f076f201c60 in thread_call (thread=thread@entry=0x7ffdea3707b0) at lib/thread.c:1497
#9  0x00007f076f1df828 in frr_run (master=0x5614efe955d0) at lib/libfrr.c:879
#10 0x00005614ee0c69fd in main (argc=1, argv=0x7ffdea370a98) at zebra/main.c:377

2018-03-09 15:20:09,022 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOU1604/ErrorLog/log_topotests.txt

IPv4 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-OSPF-3.1 failing:
Test Summary
This routing table entry then provides the outgoing interface
and next hop router to use in forwarding the packet.
(NOTE: Here we are testing the DUT forwards IP packet to the
correct interface and next hop based on an entry in the
OSPF routing table.)
Test Reference
RFC 1583, s11.1 p96 Routing table lookup
RFC 2328, s11.1 p111 Routing table lookup
Test Classification
MUST
Test ANVL-OSPF-3.1: !FAILED!
Unable to establish adjacency with router ID 192.168.0.101

RFC Compliance Test ANVL-OSPF-31.2 failing:
Test Summary
A self-originated LSA is detected when the LSA is a network-LSA and
its Link State ID is equal to one of the router's own IP interface
addresses. In this case the LSA is flushed from the routing domain.
Test Reference
RFC 2328, s13.4 p151 Receiving self-originated LSAs
Test Classification
MUST
Test ANVL-OSPF-31.2: !FAILED!
Unable to establish OSPF adjacency between DUT router ID 192.168.0.101 and
ANVL Router Router A (192.168.1.1) to state Full

RFC Compliance Test ANVL-BGP4-1.3 failing:
Test Summary
Router adds routes contained in the newly received Update Message to
its routing table
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.3: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected
IP packet forwarded by DUT

RFC Compliance Test ANVL-BGP4-1.4 failing:
Test Summary
Router forwards new Update routes
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.4: !FAILED!
External peer did not receive expected BGP4
Update Message from

RFC Compliance Test ANVL-BGP4-4.1 failing:
Test Summary
An UPDATE message MAY simultaneously advertise a feasible route and
withdraw multiple unfeasible routes from service.
Test Reference
RFC4271, Sect. 4.3, p 15,
UPDATE Message Format
Test Classification
MAY
Test ANVL-BGP4-4.1: !FAILED!
Expected to receive IP packet but did not
External peer did not receive expected IP packet
forwarded by DUT

IPv4 ldp protocol on Ubuntu 16.04: Failed

RFC Compliance Test ANVL-LDP-1.24 failing:
Test Summary
Send DUT labelled data which DUT should forward
Test Reference
Setup Verification
Test Classification
MUST
Test ANVL-LDP-1.24: !FAILED!
Peer 192.168.0.101 did not forward MPLS packet with label 16

RFC Compliance Test ANVL-LDP-26.8 failing:
Test Summary
An LSR configured for Independent Control and Downstream Unsolicited
mode sends a mapping message when the LSR recognizes a new FEC via the
forwarding table.
Test Reference
RFC 3036, s3.5.7.1.1 p67 Independent Control Mapping
Test Classification
MUST
Test ANVL-LDP-26.8: !FAILED!
Did not receive Label Mapping for FEC 172.16.12.0/24

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2829/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

r3: zebra crashed. Core file found - Backtrace follows:
[New LWP 16550]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/frr/zebra'.
Program terminated with signal SIGABRT, Aborted.
#0  0xb7fd9ce5 in ?? ()
#0  0xb7fd9ce5 in ?? ()
#1  <signal handler called>
#2  0xb7f64679 in snprintf (__fmt=0xb7f9ed01 "%02x ", __n=4294967258, __s=0xbfc1f222 "") at /usr/include/i386-linux-gnu/bits/stdio2.h:64
#3  zlog_hexdump (mem=0xa8daa0, len=30) at lib/log.c:1108
#4  0x0046ad3c in zserv_log_message (errmsg=errmsg@entry=0x0, msg=0xa85a30, hdr=hdr@entry=0xbfc1f2d0) at zebra/zserv.c:2691
#5  0x0046c6a8 in zserv_read (thread=0xbfc1f500) at zebra/zserv.c:2952
#6  0xb7f848c9 in thread_call (thread=0xbfc1f500) at lib/thread.c:1497
#7  0xb7f614c9 in frr_run (master=0x989f70) at lib/libfrr.c:879
#8  0x00426938 in main (argc=1, argv=0xbfc1f734) at zebra/main.c:377

2018-03-09 15:20:01,985 ERROR: assert failed at "test_ldp_vpls_topo1/test_ospf_convergence": r1: Daemon zebra not running
r2: Daemon zebra not running
r3: Daemon zebra not running

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2829/artifact/TOPOI386/ErrorLog/log_topotests.txt

IPv6 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-RIPNG-1.4 failing:
Test Summary
DUT forwards the packet according to routing table entry.
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-RIPNG-1.4: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-RIPNG-3.2 failing:
Test Summary
The route tag in the next hop RTE must be ignored on reception.
(Note : Prefix Length is set to zero but route tag set to non-zero
so DUT must ignore this non-zero value)
Test Reference
NEGATIVE
RFC 2080 s2.1.1 p7 Next Hop
Test Classification
MUST
Test ANVL-RIPNG-3.2: !FAILED!
Did not receive expected IPv6 packet
Did not receive expected forwarded ICMPv6 Echo Request on

RFC Compliance Test ANVL-OSPFV3-16.6 failing:
Test Summary
If the two instances of a LSA have identical LS sequence number
and LS Checksum and none of them is of age MaxAge then if their
ages differ by more than MaxAgeDiff, the instance having the
smaller age is accepted as most recent.
Test Reference
RFC 5340, s4.4.1 p23 The LSA Header
RFC 2328, s12.1.1 p117 LS age
Test Classification
MUST
Test ANVL-OSPFV3-16.6: !FAILED!
Did not receive expected IPv6 packet

RFC Compliance Test ANVL-BGPPLUS-AS4-4.1 failing:
Test Summary
When communicating with an OLD BGP speaker, a NEW speaker MUST send
the AS path information in the AS_PATH attribute encoded with 2-octet
AS numbers.
Test Reference
RFC4893 Section 4.2.2 Page 4 'Generating Updates'
Test Classification
MUST
Test ANVL-BGPPLUS-AS4-4.1: !FAILED!
External peer did not receive expected
BGP4 Update Message from DUT

Report for redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zclient.h
===============================================
< WARNING: line over 80 characters
< #523: FILE: /tmp/f1/zclient.h:523:
< +CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #56: FILE: /tmp/f1/zebra_vxlan.h:56:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 58e7db1

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

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

qlyoung added 10 commits March 12, 2018 14:47
* Allocate correct amount of memory
* Use snprintf() instead of sprintf()

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Just tests zlog_hexdump right now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
All of the ZAPI message handlers return an integer that means different
things to each of them, but nobody ever reads these integers, so this is
technical debt that we can just eliminate outright.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Formalize the ZAPI header by documenting it in code and providing it to
message handlers free of charge to reduce complexity.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
A lot of the handler functions that are called directly from the ZAPI
input processing code take different argument sets where they don't need
to. These functions are called from only one place and all have the same
fundamental information available to them to do their work. There is no
need to specialize what information is passed to them; it is cleaner and
easier to understand when they all accept the same base set of
information and extract what they need inline.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Group send and receive functions together, change handlers to take a
message instead of looking at ->ibuf and ->obuf, allow zebra to read
multiple packets off the wire at a time.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Nobody uses it, but it's got the same definition. Move the parser
function into zclient.c and use it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Get correct data size when parsing VRF ids
* Move some vars into smaller scope

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Rebased zapi-cleanup, needs a bit of poking.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

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

This is a comment from an EXPERIMENTAL 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 and apply patch from patchwork: Successful

Building Stage: Successful

Basic Tests: Failed

Addresssanitizer topotest: Successful
Debian 8 deb pkg check: Successful
Topology tests on Ubuntu 16.04 amd64: Successful
CentOS 6 rpm pkg check: Successful
Debian 9 deb pkg check: Successful
IPv4 protocols on Ubuntu 14.04: Successful
IPv4 ldp protocol on Ubuntu 16.04: Successful
Ubuntu 14.04 deb pkg check: Successful
Static analyzer (clang): Successful
IPv6 protocols on Ubuntu 14.04: Successful
CentOS 7 rpm pkg check: Successful
Ubuntu 16.04 deb pkg check: Successful
Ubuntu 12.04 deb pkg check: Successful
Fedora 24 rpm pkg check: Successful

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2853/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2018-03-12 20:44:35,928 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_convergence": BGP router network did not converge
assert json["ipv4Unicast"]["peers"]["10.0.1.101"]["state"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -"Established"
  +"Idle")
  json["ipv4Unicast"]["peers"]["10.0.1.101"]["prefixReceivedCount"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -10
  +0)
2018-03-12 20:44:39,148 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_vrf_netns": expected routes in "show ip bgp vrf r1-cust1 ipv4" output
assert expected key(s) ['10.201.3.0/24', '10.201.6.0/24', '10.201.5.0/24', '10.201.8.0/24', '10.201.9.0/24', '10.201.0.0/24', '10.201.2.0/24', '10.201.1.0/24', '10.201.4.0/24', '10.201.7.0/24'] in json["routes"] (have []):
  --- Expected value
  +++ Current value
  @@ -1,52 +1 @@
  -{
  -    "10.201.0.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.1.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.2.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.3.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.4.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.5.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.6.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.7.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.8.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.9.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ]
  -}
  +{}

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2853/artifact/TOPOI386/ErrorLog/log_topotests.txt

Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2853/artifact/TOPOI386/MemoryLeaks/

Warnings Generated during build:

Checkout code: Successful with additional warnings:

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2853/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2018-03-12 20:44:35,928 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_convergence": BGP router network did not converge
assert json["ipv4Unicast"]["peers"]["10.0.1.101"]["state"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -"Established"
  +"Idle")
  json["ipv4Unicast"]["peers"]["10.0.1.101"]["prefixReceivedCount"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -10
  +0)
2018-03-12 20:44:39,148 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_vrf_netns": expected routes in "show ip bgp vrf r1-cust1 ipv4" output
assert expected key(s) ['10.201.3.0/24', '10.201.6.0/24', '10.201.5.0/24', '10.201.8.0/24', '10.201.9.0/24', '10.201.0.0/24', '10.201.2.0/24', '10.201.1.0/24', '10.201.4.0/24', '10.201.7.0/24'] in json["routes"] (have []):
  --- Expected value
  +++ Current value
  @@ -1,52 +1 @@
  -{
  -    "10.201.0.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.1.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.2.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.3.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.4.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.5.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.6.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.7.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.8.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.9.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ]
  -}
  +{}

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2853/artifact/TOPOI386/ErrorLog/log_topotests.txt

Report for redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zclient.h
===============================================
< WARNING: line over 80 characters
< #523: FILE: /tmp/f1/zclient.h:523:
< +CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #56: FILE: /tmp/f1/zebra_vxlan.h:56:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 9d16566

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2853/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-2853/

This is a comment from an EXPERIMENTAL 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 redistribute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #32: FILE: /tmp/f1/redistribute.h:32:
< +extern void zebra_redistribute_delete(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/redistribute.h:33:
< +extern void zebra_redistribute_default_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #34: FILE: /tmp/f1/redistribute.h:34:
< +extern void zebra_redistribute_default_delete(ZAPI_HANDLER_ARGS);
---
Report for rtadv.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #106: FILE: /tmp/f1/rtadv.h:106:
< +extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #107: FILE: /tmp/f1/rtadv.h:107:
< +extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
< 
Report for zclient.h
===============================================
< WARNING: line over 80 characters
< #523: FILE: /tmp/f1/zclient.h:523:
< +CPP_NOTICE("zapi_ipv4_route, zapi_ipv6_route, zapi_ipv4_route_ipv6_nexthop as well as the zapi_ipv4 and zapi_ipv6 data structures should be removed now");
< 
Report for zebra_mroute.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #33: FILE: /tmp/f1/zebra_mroute.h:33:
< +void zebra_ipmr_route_stats(ZAPI_HANDLER_ARGS);
---
Report for zebra_ptm.c
===============================================
< WARNING: void function return statements are not generally useful
< #1013: FILE: /tmp/f1/zebra_ptm.c:1013:
< +	return;
< +}
Report for zebra_ptm.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #68: FILE: /tmp/f1/zebra_ptm.h:68:
< +void zebra_ptm_bfd_dst_register(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #69: FILE: /tmp/f1/zebra_ptm.h:69:
< +void zebra_ptm_bfd_dst_deregister(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #70: FILE: /tmp/f1/zebra_ptm.h:70:
< +void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
< 
Report for zebra_vxlan.h
===============================================
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #56: FILE: /tmp/f1/zebra_vxlan.h:56:
< +extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #57: FILE: /tmp/f1/zebra_vxlan.h:57:
< +extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #58: FILE: /tmp/f1/zebra_vxlan.h:58:
< +extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #59: FILE: /tmp/f1/zebra_vxlan.h:59:
< +extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #60: FILE: /tmp/f1/zebra_vxlan.h:60:
< +extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #61: FILE: /tmp/f1/zebra_vxlan.h:61:
< +extern void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS);
< 
< WARNING: function definition argument 'ZAPI_HANDLER_ARGS' should also have an identifier name
< #62: FILE: /tmp/f1/zebra_vxlan.h:62:
< +extern void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS);
< 

CLANG Static Analyzer Summary

  • Github Pull Request 1828, comparing to Git base SHA 9d16566

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

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

@rwestphal rwestphal merged commit ecef81c into FRRouting:master Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants