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

[Bug]: socat UDP listen error, but netcat is fine #18645

Closed
brianwoo opened this issue Dec 8, 2023 · 5 comments · Fixed by #18669
Closed

[Bug]: socat UDP listen error, but netcat is fine #18645

brianwoo opened this issue Dec 8, 2023 · 5 comments · Fixed by #18669
Labels
bug report Something is not working properly upstream issue It is an upstream issue

Comments

@brianwoo
Copy link

brianwoo commented Dec 8, 2023

Problem description

I have this problem where socat cannot listen on any UDP port for some reason. Netcat can listen fine on the same UDP port. The error was xioopen_ipdgram_listen(): unknown address family 0. I have tried this on 2 different Android phones and I am getting the same error.
IMG_20231206_202157

What steps will reproduce the bug?

From Termux, enter the following:

socat -dd udp-listen:1234,fork,reuseaddr,bind=127.0.0.1 -

The same UDP listen from netcat and worked:

nc -u -vv -l 1234

What is the expected behavior?

socat should be able to listen on udp port 1234.

System information

termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=7034
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://plug-mirror.rcac.purdue.edu/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://plug-mirror.rcac.purdue.edu/termux/termux-x11 x11 main
# root-repo (sources.list.d/root.list)
deb https://plug-mirror.rcac.purdue.edu/termux/termux-root root stable
Updatable packages:
All packages up to date
termux-tools version:
1.39.5
Android version:
14
Kernel build information:
Linux localhost 5.10.177-android13-4-00003-ga7208022a7ea-ab10815828 #1 SMP PREEMPT Fri Sep 15 16:40:54 UTC 2023 aarch64 Android
Device manufacturer:
Google
Device model:
Pixel 6
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
@licy183
Copy link
Member

licy183 commented Dec 9, 2023

This is a bug of socat version 1.8.0.0. It is also reproducible on Alpine Linux 3.19 (with socat version 1.8.0.0), or even a newly built one.

image

image

@licy183 licy183 added the upstream issue It is an upstream issue label Dec 9, 2023
@brianwoo
Copy link
Author

brianwoo commented Dec 9, 2023

Thanks very much for testing it. Really appreciate it.

@licy183
Copy link
Member

licy183 commented Dec 9, 2023

I've submitted a temporary fix for it and have reported this issue upstream. I will not close this issue until upstream resolves it. Thanks for your report!

@ezekielnewren
Copy link

This is a bug of socat version 1.8.0.0. It is also reproducible on Alpine Linux 3.19 (with socat version 1.8.0.0), or even a newly built one.

image

image

I was trying to run 'socat UDP-LISTEN:5000,fork -' on Alpine Linux 3.19 and I got this error.

@licy183
Copy link
Member

licy183 commented Dec 31, 2023

You need to report it to Alpine Linux or build socat from source with this patch.

eliferrous added a commit to eliferrous/udp-echo-app that referenced this issue Jan 18, 2024
getting error found in termux/termux-packages#18645, so I switched to debian, which worked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly upstream issue It is an upstream issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants