pat: Linux AX25: `address already in use` error after first connection
I’ve got Direwolf running as a software TNC with the -p
command, and I run kissattach
to connect the Linux AX.25 stack to that port.
This works, and when I connect
in Pat, my emails are sent and received, and Pat disconnects.
Afterwards, any attempts to connect again are met with:
Remote accepted 4BR6SH6JZATY
Transmitting [Re: Test] [offset 0]
FF
>FQ
2022/05/16 02:25:09 Disconnected.
2022/05/16 02:25:24 Connecting to N4POW-10 (ax25)...
2022/05/16 02:25:24 Unable to establish connection to remote: address already in use
Active AX.25 sockets
Dest Source Device State Vr/Vs Send-Q Recv-Q
N4POW-10 K1MLN-0 ax0 LISTENING 006/001 0 0
N4POW-10 K1MLN-0 ??? LISTENING 002/004 0 0
N4POW-10 K1MLN-0 ??? LISTENING 006/000 0 0
N4POW-10 K1MLN-0 ??? LISTENING 005/002 0 0
N4POW-10 K1MLN-0 ??? LISTENING 005/002 0 0
N4POW-10 K1MLN-0 ??? LISTENING 005/002 0 0
N4POW-10 K1MLN-0 ??? LISTENING 006/003 0 0
N4POW-10 K1MLN-0 ??? LISTENING 006/000 0 0
N4POW-10 K1MLN-0 ??? LISTENING 005/002 0 0
$ sudo ifconfig ax0
ax0: flags=67<UP,BROADCAST,RUNNING> mtu 255
ax25 K1MLN-9 txqueuelen 10 (AMPR AX.25)
RX packets 81 bytes 6678 (6.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 49 bytes 1397 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I have no similar problems when using simply axcall
. I can connect and reconnect all day, even after Pat gets into this bad state. But Pat will not work.
Restarting Pat doesn’t resolve it - I have to restart everything all the way up to Direwolf.
Pat Version 0.12.1-2+b1 Direwolf Version 1.6 $ uname -rv 5.17.5-surface #3 SMP PREEMPT Sat May 7 16:37:05 UTC 2022 (A custom kernel for Surface Laptops running Debian)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 24 (5 by maintainers)
This specific kernel bug (others) has finally been getting some review. Please see https://www.spinics.net/lists/linux-hams/ for some of the archives. Specifically, here is the thread on the stale AX.25 session issue: https://www.spinics.net/lists/linux-hams/msg04952.html . Once a viable fix is made available aligning to all the other fixes that are in flight, it will take some time (months / quarters) until a standard Linux distribution might publish them for enduser consumption
I’ve been trying to reproduce this today running two Pat instances (P2P) (
develop
builds) with older kernel versions:Linux node-a 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
Linux node-b 4.9.0-18-686-pae #1 SMP Debian 4.9.303-1 (2022-03-07) i686 GNU/Linux
The connection teardown works as intended, with no dangling connections. This leads me to believe that this is either a bug in recent Linux kernels or has already been resolved in recent commits.
Can you please try building the develop branch and see if you’re able to reproduce the issue?
Thanks!