Closed XDjackieXD closed 1 day ago
A bit of digging later, it seems like this is caused by
https://github.com/OLSR/OONF/blob/master/src/generic/dlep/ext_base_proto/proto_router.c#L293
and
https://github.com/OLSR/OONF/blob/master/src/generic/dlep/ext_base_proto/proto_router.c#L333
using the interface, the dlep router is configured for to set up the TCP session connection, instead of using the datapath_if.
Changing ifdata->index
in both lines to use the interface index of datapath_if
should fix this (although I'm not quite sure where to get this value in that context).
(so the discovery packet is sent on the correct interface and the offer is received on the correct interface but it then tries to establish the TCP connection on the wrong interface)
@XDjackieXD Many thanks for providing more research at this topic. Do you don't mind to create a patch, compile it and test it in your environment? I pull request with your tested change is highly appreciated.
I will prepare a PR. I'd guess you prefer the PR to be against the develop branch?
PR is open and seems to be working fine on my OpenWrt setup!
@mathiashro could you please merge the PR?
PR #55 has been merged.
When trying to run DLEP information out of band (so you don't have to use ebtables) it is impossible to get the dlep_router to actually try the session connection on the interface specified by
datapath_if
. It correctly uses thedatapath_if
for the UDP discovery but then tries to connect to the discovereddlep_radio
on the "main" interface instead of thedatapath_if
... Even using non-link-local IPv4 addresses with connect_to doesn't work as the connect syscall seems to have the interface specified.When setting the datapath interface as the "main" interface for
dlep_router
, this leads to it correctly connecting todlep_radio
and getting all the l2 info but not using them for the real "main" interface but showing a new interface in olsrd2layer2info interface
.Example output when using the datapath interface as "main" interface for the
dlep_router
config (eth4.255
should have all the l2 info now displayed as a new interfaceeth4.254
):