Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

bgpd: [5.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag #4146

Merged
merged 1 commit into from
Apr 17, 2019
Merged

bgpd: [5.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag #4146

merged 1 commit into from
Apr 17, 2019

Conversation

ton31337
Copy link
Member

peer_flag_modify() will always return BGP_ERR_INVALID_FLAG because
the action was not defined for PEER_FLAG_IFPEER_V6ONLY flag.

global PEER_FLAG_IFPEER_V6ONLY = 16384;
global BGP_ERR_INVALID_FLAG = -2;

probe process("/usr/lib/frr/bgpd").statement("peer_flag_modify@/root/frr/bgpd/bgpd.c:3975")
{
	if ($flag == PEER_FLAG_IFPEER_V6ONLY && $action->type == 0)
		printf("action not found for the flag PEER_FLAG_IFPEER_V6ONLY\n");
}

probe process("/usr/lib/frr/bgpd").function("peer_flag_modify").return
{
	if ($return == BGP_ERR_INVALID_FLAG)
		printf("return BGP_ERR_INVALID_FLAG\n");
}

produces:
action not found for the flag PEER_FLAG_IFPEER_V6ONLY
return BGP_ERR_INVALID_FLAG

$ vtysh -c 'conf t' -c 'router bgp 20' -c 'neighbor eth1 interface v6only remote-as external'

Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com

peer_flag_modify() will always return BGP_ERR_INVALID_FLAG because
the action was not defined for PEER_FLAG_IFPEER_V6ONLY flag.

```
global PEER_FLAG_IFPEER_V6ONLY = 16384;
global BGP_ERR_INVALID_FLAG = -2;

probe process("/usr/lib/frr/bgpd").statement("peer_flag_modify@/root/frr/bgpd/bgpd.c:3975")
{
	if ($flag == PEER_FLAG_IFPEER_V6ONLY && $action->type == 0)
		printf("action not found for the flag PEER_FLAG_IFPEER_V6ONLY\n");
}

probe process("/usr/lib/frr/bgpd").function("peer_flag_modify").return
{
	if ($return == BGP_ERR_INVALID_FLAG)
		printf("return BGP_ERR_INVALID_FLAG\n");
}
```
produces:
action not found for the flag PEER_FLAG_IFPEER_V6ONLY
return BGP_ERR_INVALID_FLAG

$ vtysh -c 'conf t' -c 'router bgp 20' -c 'neighbor eth1 interface v6only remote-as external'

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
@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-7253/

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


CLANG Static Analyzer Summary

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

82 Static Analyzer issues remaining.

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

@ton31337 ton31337 changed the title bgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag bgpd: [5.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag Apr 16, 2019
@qlyoung qlyoung merged commit 5cdb4a6 into FRRouting:stable/5.0 Apr 17, 2019
@ton31337 ton31337 deleted the fix/add_missing_peer_flag_for_ipv6_only branch April 19, 2019 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants