openwrt integration for xl2tpd (netifd?) seems broken
@feckert is already working on this.
Since Jul 19, 2019.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
We run an assocation-operator our members has internet connection with L2TP tunnel. Sometimes we have to reach this L2TP tunnel in a bmx6 mesh network and others, with a BGP network.
In certain situations the router could do the L2TP connection, specially without bmx6 mesh routing protocol. But in others, with bmx6 mesh routing protocol, L2TP is not possible (looks like when they share same interface, but I don't know). I'm sure this is affecting other use cases because
So I suspect that there is a bug that is present in certain network config situations.
The L2TP server I am testing is a crappy mikrotik L2TP server, that's why we configure very very few parameters, but it just works (we are going to migrate to accel-ppp at some point! :))
This /etc/config/network config fails:
# other stuff, but at the bottom:
config interface 'exo'
option proto 'l2tp'
option server '1.2.3.4' # ip of L2TP server
option username 'myuser'
option password 'mypassword'
option ipv6 '1'
option mtu 1420
option checkup_interval '10'
option keepalive '20,10'
logread when is not working (in bmx6 mesh node)
Fri Jul 5 01:26:16 2019 daemon.notice netifd: Interface 'exo' is setting up now
Fri Jul 5 01:26:18 2019 daemon.debug xl2tpd[984]: No such tunnel 'l2tp-exo'
Fri Jul 5 01:26:18 2019 daemon.notice netifd: exo (1221): xl2tpd-control: Remove l2tp-exo failed
logread when is working (without bmx6 mesh node) - so it starts failing and after that gets corrected (?)
Thu Jul 4 16:00:32 2019 daemon.notice netifd: Interface 'exo' is setting up now
Thu Jul 4 16:00:32 2019 daemon.debug xl2tpd[3008]: No such tunnel 'l2tp-exo'
Thu Jul 4 16:00:32 2019 daemon.notice netifd: exo (4147): xl2tpd-control: Remove l2tp-exo failed
Thu Jul 4 16:00:32 2019 daemon.notice netifd: Interface 'exo' is now down
Thu Jul 4 16:00:42 2019 daemon.notice netifd: Interface 'exo' is setting up now
Thu Jul 4 16:00:42 2019 daemon.debug xl2tpd[3008]: "/tmp/l2tp/options.exo"
Thu Jul 4 16:00:43 2019 kern.info kernel: [ 4090.114779] l2tp-exo: renamed from ppp0
Thu Jul 4 16:00:43 2019 daemon.info pppd[4606]: Using interface l2tp-exo
Thu Jul 4 16:00:43 2019 daemon.notice pppd[4606]: Connect: l2tp-exo <-->
Thu Jul 4 16:00:43 2019 daemon.notice netifd: Network device 'l2tp-exo' link is up
Thu Jul 4 16:00:43 2019 daemon.notice netifd: Interface 'exo' is now up
Thu Jul 4 16:00:43 2019 user.notice firewall: Reloading firewall due to ifup of exo (l2tp-exo)
additionally I have problems debugging this issue, I tried to follow the trace in /lib/netifd/proto/l2tp.sh putting set -x as header. Lots of lines but I got nothing relevant to understand what's happening
then I decided to bypass openwrt's xl2tpd integration, so I configured directly /etc/xl2tpd/xl2tpd.conf
[global]
port = 1701
access control = no
auth file = /etc/ppp/chap-secrets
debug avp = no ; enable for debug
[lac exo]
;L2TP server
lns = 1.2.3.4
redial = yes
redial timeout = 5
ppp debug = no ; enable for debug
pppoptfile = /etc/ppp/options.xl2tpd
autodial = yes
name = myuser
in /etc/ppp/chap-secrets a line with myuser * mypassword
in /etc/ppp/options.xl2tpd:
replacedefaultroute
defaultroute
persist
maxfail 0
# Don't wait for LCP term responses; exit immediately when killed.
lcp-max-terminate 0
noproxyarp
mtu 1420
mru 1420
then it worked, conclusion: everything looks fine but we reached a bug in the openwrt integration, do you agree? What's next?
(the L2TP configurations are from our wiki documentation (catalan): https://gitlab.com/guifi-exo/wiki/blob/master/howto/l2tp-client-configuration/README.md)
Previous bugreports, asks for help
- in the firmware we use - hope we can fix it!
- https://forum.openwrt.org/t/package-xl2tpd-not-working-on-nano-loco-xw-ar71xx/39922 - I started very confused and the problem is not very well explained there (and now I think it confirms is a bug)
Thanks for your time,
Pedro
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.