-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bmp: add a interface source to bmp connect command #11353
Conversation
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5778/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix all the new warnings from CI.
bgpd/bgp_bmp.c
Outdated
continue; | ||
case connect_success: | ||
sockunion2str(&ba->addrs[ba->addrpos], buf, | ||
sizeof(buf)); | ||
zlog_warn("bmp[%s]: connected to %s:%d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this warning or info?
&ba->addrsrc); | ||
if (res_bind < 0) { | ||
sockunion2str(&ba->addrsrc, buf, sizeof(buf)); | ||
zlog_warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zlog_err?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same question still, is this supposed to be an error or warning? Failed
seems to be related to error?
bgpd/bgp_bmp.c
Outdated
} | ||
if (bgp_update_address(ifp,&ba->addrs[ba->addrpos], | ||
&ba->addrsrc)){ | ||
zlog_warn("bmp[%s]: failed to find matching" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zlog_err?
bgpd/bgp_bmp.c
Outdated
"address",ba->ifsrc); | ||
continue; | ||
} | ||
zlog_warn("bmp[%s]: selected source address : %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zlog_info?
bgpd/bgp_bmp.c
Outdated
@@ -1773,8 +1776,38 @@ static void bmp_active_connect(struct bmp_active *ba) | |||
{ | |||
enum connect_result res; | |||
char buf[SU_ADDRSTRLEN]; | |||
struct interface *ifp; | |||
vrf_id_t vrf_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest initializing this to VRF_DEFAULT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken into account
doc/user/bmp.rst
Outdated
@@ -109,12 +109,14 @@ Inside a ``bmp targets`` block, the following commands control session | |||
establishment: | |||
|
|||
.. clicmd:: bmp connect HOSTNAME port (1-65535) {min-retry MSEC|max-retry MSEC} | |||
[source-interface <WORD>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep this in the same line as above parameters?
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5818/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5822/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still, CI warnings are not yet fixed.
doc/user/bmp.rst
Outdated
|
||
Add/remove an active outbound BMP session. HOSTNAME is resolved via DNS, | ||
if multiple addresses are returned they are tried in nondeterministic | ||
order. Only one connection will be established even if multiple addresses | ||
are returned. ``min-retry`` and ``max-retry`` specify (in milliseconds) | ||
bounds for exponential backoff. | ||
bounds for exponential backoff. source-interface is the locale interface on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please highlight source-interface with double-ticks (``).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, typo locale
.
doc/user/bmp.rst
Outdated
@@ -108,13 +108,15 @@ BMP session configuration | |||
Inside a ``bmp targets`` block, the following commands control session | |||
establishment: | |||
|
|||
.. clicmd:: bmp connect HOSTNAME port (1-65535) {min-retry MSEC|max-retry MSEC} | |||
|
|||
.. clicmd:: bmp connect HOSTNAME port (1-65535) {min-retry MSEC|max-retry MSEC} [source-interface <WORD>] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<> not needed wrapping WORD
bgpd/bgp_bmp.c
Outdated
@@ -2432,10 +2511,15 @@ static int bmp_config_write(struct bgp *bgp, struct vty *vty) | |||
sockunion2str(&bl->addr, buf, SU_ADDRSTRLEN), | |||
bl->port); | |||
|
|||
frr_each (bmp_actives, &bt->actives, ba) | |||
frr_each (bmp_actives, &bt->actives, ba) { | |||
vty_out(vty, " bmp connect %s port %u min-retry %u max-retry %u\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't \n be stripped for this vty_out?
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5831/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5832/ This is a comment from an automated CI system. |
ci:rerun |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
ci:rerun |
previous CI tests were working |
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5870/ This is a comment from an automated CI system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more nits, overall LGTM.
bgpd/bgp_bmp.c
Outdated
@@ -1741,6 +1742,7 @@ static struct bmp_active *bmp_active_get(struct bmp_targets *bt, | |||
ba->port = port; | |||
ba->minretry = BMP_DFLT_MINRETRY; | |||
ba->maxretry = BMP_DFLT_MAXRETRY; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop this new line from this change?
bgpd/bgp_bmp.c
Outdated
@@ -1773,8 +1776,37 @@ static void bmp_active_connect(struct bmp_active *ba) | |||
{ | |||
enum connect_result res; | |||
char buf[SU_ADDRSTRLEN]; | |||
struct interface *ifp; | |||
vrf_id_t vrf_id = VRF_DEFAULT; | |||
int res_bind; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop additional (two) whitespace after int
?
&ba->addrsrc); | ||
if (res_bind < 0) { | ||
sockunion2str(&ba->addrsrc, buf, sizeof(buf)); | ||
zlog_warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same question still, is this supposed to be an error or warning? Failed
seems to be related to error?
bgpd/bgp_bmp.c
Outdated
{ | ||
VTY_DECLVAR_CONTEXT_SUB(bmp_targets, bt); | ||
struct bmp_active *ba; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop this new line from this change?
i changed the message associated to unsucessfull bind now: |
With current release, forcin the source ip address when setting up a BMP connection is not possible. The need is to add an extra parameter for the following vty command: router bgp 65500 bmp targets AAA bmp connect 2.2.2.2 port 666 min-retry 100 max-retry 700 bmp connect 2:2::2:2 port 666 min-retry 100 max-retry 700 [source-interface lo1] Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5958/ This is a comment from an automated CI system. |
With current release, forcin the source ip address when setting up a BMP
connection is not possible.
The need is to add an extra parameter for the following vty command:
router bgp 65500
bmp targets AAA
bmp connect 2.2.2.2 port 666 min-retry 100 max-retry 700
bmp connect 2:2::2:2 port 666 min-retry 100 max-retry 700 [source-interface lo1]
Signed-off-by: Francois Dumontet francois.dumontet@6wind.com