rtrlib: ability to pass configured socket in tcp/ssh attribute#252
rtrlib: ability to pass configured socket in tcp/ssh attribute#252pguibert6WIND wants to merge 3 commits intortrlib:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
This is a good start, but it won't work. int new_socket(void *data);where data points to caller provided data, which should be stored in the config struct too. And I don't think it makes sense to put the sockets fd number in the ident string. |
958db34 to
eaf53b3
Compare
|
just a quick update to see if it conforms to your counter proposal. |
This comment has been minimized.
This comment has been minimized.
mroethke
left a comment
There was a problem hiding this comment.
Looks good in general, but I have some comments.
Did you check what state libssh expects for the socket? Do we have to connect it ourself?
eaf53b3 to
cec5f93
Compare
|
Marcel, actually, I dont know why, test fail because of that piece of code ( call is done despite new_socket is supposed to be null). |
This comment has been minimized.
This comment has been minimized.
|
You are not initializing the socket config properly in From valgrind: |
cec5f93 to
9f49757
Compare
This comment has been minimized.
This comment has been minimized.
|
Some additional info: The config struct is copied in |
9f49757 to
698288c
Compare
|
Hi @mroethke , |
698288c to
6304ab5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6304ab5 to
0f2a12f
Compare
This comment has been minimized.
This comment has been minimized.
0f2a12f to
6748b1e
Compare
|
When testing, I still encounter an issue with callback update_fp(). in frr code, somehow the calculated tr_socket pointer is wrong ( 0x73) which is invalid pointer. strangely it was working with default rpki. do you know which method I should use to retrieve the right context? from pfx_table, how could I retrieve the correct tr_socket pointer ? |
This comment has been minimized.
This comment has been minimized.
|
Hi @mroethke , |
6748b1e to
93d1c58
Compare
|
Did you install socat? |
|
socat version 1.7.3.2 on Apr 4 2018 10:06:49 |
|
looks like my ssh settings are incirrect |
|
ok, the tip was, instead of using the public key directly, ( |
|
Hi @mroethke,
config example used: thanks to let me know if there are still pending points to discuss, or can this pr be unblocked, now that SSH has been tested. |
|
Hi @mroethke , |
|
I think it looks good now. But would still like to have another opinion. |
|
thanks Marcel, I am looking forward to get news on this pr |
|
Hi, |
|
ping @mroethke |
|
coverity pointed out to me, that this breaks the rtrclient. Because the new fields are not initialized. Same for current version of frr. Fixing this in rtrclient is as simple as this: diff --git a/tools/rtrclient.c b/tools/rtrclient.c
index 3b89e11..0fb7749 100644
--- a/tools/rtrclient.c
+++ b/tools/rtrclient.c
@@ -755,9 +755,9 @@ static void init_sockets(void)
{
for (size_t i = 0; i < socket_count; ++i) {
struct socket_config *config = socket_config[i];
- struct tr_tcp_config tcp_config;
+ struct tr_tcp_config tcp_config = {};
#ifdef RTRLIB_HAVE_LIBSSH
- struct tr_ssh_config ssh_config;
+ struct tr_ssh_config ssh_config = {};
#endif
switch (config->type) {Please add this, than I will merge. I will also prepare fixes for supported version of frr asap. |
the structures tr_tcp_config and tr_ssh_config were not set to 0 at startup, when init_sockets() call is done. handle this by initialising those structures. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedFedora 29 amd64: Failed (click for details)Fedora 29 amd64: Unknown Log URL: https://ci1.netdef.org/browse/RPKI-RTRLIBPR-275/artifact/FEDORA29AMD64/ErrorLog/log_rpmlint.txt Fedora 29 amd64: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Debian 10 amd64: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64: Ubuntu 16.04 arm8: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 arm8: Ubuntu 18.04 ppc64le: Successful with additional warningsDebian Package lintian failed for Ubuntu 18.04 ppc64le: Ubuntu 16.04 i386: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 i386: Ubuntu 18.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 18.04 amd64: Ubuntu 14.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 14.04 amd64: Ubuntu 16.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 amd64: Ubuntu 16.04 arm7: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 arm7: |
|
strange: on https://ci1.netdef.org/browse/RPKI-RTRLIBPR-FEDORA29AMD64-275/log, is there a way to relaunch CI ? |
|
ci:rerun |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedFedora 29 amd64: Failed (click for details)Fedora 29 amd64: Unknown Log URL: https://ci1.netdef.org/browse/RPKI-RTRLIBPR-276/artifact/FEDORA29AMD64/ErrorLog/log_rpmlint.txt Fedora 29 amd64: No useful log foundSuccessful on other platforms/tests
Warnings Generated during build:Ubuntu 14.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 14.04 amd64: Ubuntu 16.04 arm8: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 arm8: Ubuntu 18.04 ppc64le: Successful with additional warningsDebian Package lintian failed for Ubuntu 18.04 ppc64le: Debian 10 amd64: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64: Ubuntu 16.04 i386: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 i386: Ubuntu 18.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 18.04 amd64: Ubuntu 16.04 amd64: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 amd64: Ubuntu 16.04 arm7: Successful with additional warningsDebian Package lintian failed for Ubuntu 16.04 arm7: |
|
I just merged and pushed this manually. Thanks! |
|
Hi @waehlisch , who could help on having an official delivery of rtrlib ? I would love having an up to date rtrlib version for linux distros:) |
|
@pguibert6WIND rtrlib is available as an official Debian package (https://packages.debian.org/search?keywords=librtr-dev) -- you mean we need to update the package? |
|
@waehlisch , that is it. updating the package would be very nice. I know it takes time. I dont know who to contact and how to package to different distros. |
|
last time @lukas227 helped us. ping. but, librtr-0.7 is already part of stable (see Version widget https://tracker.debian.org/pkg/librtr). what we need to do is to create a new RTRlib release. this will then be adapted in Debian. if #256 is merged, we can create a new release. |
|
Happy update the package in Debian once you've created a new release. |
a new attribute socket is given in tr_ssh_config and tr_tcp_config
structures. as the structures are visible for configuration by the
caller, it becomes possible to create early the socket that will be
used later by rtrlib. some scenarios like vrf usage can be possible.
for instance, the socket is first created in the appropriate vrf, then
submitted to rtrlib that uses it to connect to the target.
Also, tr_ident_fp is modified so as to return the configured socket
ctxt. this is helpful to retrieve the context.
Signed-off-by: Philippe Guibert philippe.guibert@6wind.com