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

Fix DLEP Router TCP Session Interface #55

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Conversation

XDjackieXD
Copy link

Previously, DLEP router would always chose the "main" inteface when trying to establish a DLEP TCP session, even if an out of band datapath interface is specified.
This PR changes the behaviour to use the same interface for the TCP connection that the discovery offer was received on.

This is tested to be working on OpenWrt 22.03.0 with the following configs (eth3 is the interface on the router, eth0 is the interface on the wifi device. VLAN 254 is used for DLEP with only IPv6 LL addresses and VLAN 255 is used for the actual data):

/etc/config/olsrd2 on the router:

config global
	option 'failfast'	'no'
	option 'pidfile'	'/var/run/olsrd2.pid'
	option 'lockfile'	'/var/lock/olsrd2'

config log
	option 'syslog'		'true'
	option 'stderr'		'true'
#	option 'debug'		'dlep_router'

config telnet
	option 'port' '2009'

config olsrv2
	list 'originator' '-fe80::/112'
	list 'originator' '-2a02:61:0:ee:1::0/80'
	list 'originator' '-2a02:60::0/32'
	list 'originator' '-0.0.0.0/0'
	list 'originator' '-::1/128'
	list 'originator' 'default_accept'

config interface
	option 'ifname' 'loopback'
	list 'bindto' '-0.0.0.0/0'
	list 'bindto' '-::1/128'
	list 'bindto' 'default_accept'

config interface
	option 'ifname' '0xff_eth3'
	list 'bindto' '-0.0.0.0/0'
	list 'bindto' '-::1/128'
	list 'bindto' 'default_accept'

config dlep_router
	option 'ifname' '0xff_eth3'
	option 'datapath_if' 'eth3.254'

/etc/config/dlep_radio on the wifi device:

config global
	option 'failfast' 'no'
	option 'pidfile'  '/var/run/dlep_radio.pid'
	option 'lockfile' '/var/lock/dlep_radio'

config log
	option 'syslog'   'true'
	option 'stderr'   'true'

config telnet
	option 'port' '2009'

config dlep_radio
	list   'name'               'wlan0'
	option 'datapath_if'  'eth0.254'
	option 'not_proxied' 'false'
	option 'proxied'        'true'

config nl80211_listener
	option 'if'          'wlan0'
	option 'interval'    '1.0'

Also included in this PR are the changes to the OpenWrt Makefiles to reflect the changes between master and develop in terms of plugin configuration.

@mathiashro mathiashro merged commit a82ecdb into OLSR:develop Nov 6, 2023
@mathiashro
Copy link
Contributor

@XDjackieXD, thank you for your contribution.

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.

2 participants