Application is listen to UDP port but no output

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
drunkenchicken
Level 1
Level 1
Posts: 5
Joined: Tue Nov 09, 2010 5:00 pm

Application is listen to UDP port but no output

Post by drunkenchicken »

Hello Wine Forum,
I searched some time before i wrote this message, but maybe I just used the wrong keywords.
I'm running a test version of Win-Test (www.win-test.com) and I tried to run it in Network with an Windows Laptop. The network communication of this software is running over udp port 9871. If i send a request from the Laptop to the wine application i see the correct reaction on the wine screen, but i don't get a get a feedback on the windows machine.

I used Wireshark to debug the network traffic and i discoverd on eth0 only traffic from laptop to wine application.

I tried to open the ports with:

Code: Select all

sudo iptables -A OUTPUT -p udp --dport 9871 -j ACCEPT
but the same old story.

Some ideas out there?

Thanks Olli
drunkenchicken
Level 1
Level 1
Posts: 5
Joined: Tue Nov 09, 2010 5:00 pm

Post by drunkenchicken »

Me Again,
I tried some stuff with some other software which is using udp with the same result. I'm guessing its a problem of winsock.

I also send as normal user a udp package from my linux machine to the Windows laptop with sucess.
Now i know the udp port is able to send data in unix.

With this info somebody may have an idea?

thanks Olli
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

drunkenchicken wrote:I tried some stuff with some other software which is using udp with the same result. I'm guessing its a problem of winsock.
Please open a bug in bugzilla. If you can make a simple test showing the problem it would even be better.
drunkenchicken
Level 1
Level 1
Posts: 5
Joined: Tue Nov 09, 2010 5:00 pm

Post by drunkenchicken »

vitamin wrote:
drunkenchicken wrote:I tried some stuff with some other software which is using udp with the same result. I'm guessing its a problem of winsock.
Please open a bug in bugzilla. If you can make a simple test showing the problem it would even be better.
Hi vitamin,
i checked some other issues and I found the problem of sending udp packets is only a problem on the broadcast address. I searched winehq and i found this isn't a bug. On issue 62 http://www.winehq.org/wwn/62 is exactly the problem as i have. I guess it is the same. But I don't know how to make the workaround. I do have a default gateway, but no idea what "add an explicit route from 255.255.255.255 to the local network" means.

Olli
drunkenchicken
Level 1
Level 1
Posts: 5
Joined: Tue Nov 09, 2010 5:00 pm

Post by drunkenchicken »

Hi forum,

I checked the output of winedebug with +winsock option.
For me the interested part is:

Code: Select all

trace:winsock:WSAStartup succeeded
trace:winsock:WS_gethostname name 0x32f154, len 256
trace:winsock:WS_gethostname <- 'fusion'
trace:winsock:WS_gethostbyname "fusion" ret 0x16e7d0
trace:winsock:WS_socket af=2 type=2 protocol=0
trace:winsock:WSASocketA af=2 type=2 protocol=0 protocol_info=(nil) group=0 flags=0x1
trace:winsock:WSASocketW af=2 type=2 protocol=0 protocol_info=(nil) group=0 flags=0x1
trace:winsock:WSASocketW 	created 0138
trace:winsock:WSAAsyncSelect 138, hWnd 0x1400be, uMsg 00000373, event 00000003
trace:winsock:WS_setsockopt socket: 0138, level 0xffff, name 0x4, ptr 0x32f3a8, len 4
trace:winsock:WS_bind socket 0138, ptr 0x32f374 { family AF_INET, address 0.0.0.0, port 9871 }, length 16
trace:winsock:WS2_sendto socket 0138, wsabuf 0x32f2f0, nbufs 1, flags 0, to 0x32f354, tolen 16, ovl (nil), func (nil)
trace:winsock:WS2_sendto fd=133, options=0
warn:winsock:wsaErrno errno 13, (Permission denied).
warn:winsock:WS2_sendto  -> ERROR 10013
trace:winsock:WSAStartup verReq=2
trace:winsock:WSAStartup succeeded
trace:winsock:WS_gethostname name 0x32ee24, len 256
trace:winsock:WS_gethostname <- 'fusion'
trace:winsock:WS_gethostbyname "fusion" ret 0x16e7d0
trace:winsock:DllMain 0x7dcb0000 0x2 (nil)
trace:winsock:WSAStartup verReq=2
trace:winsock:WSAStartup succeeded
trace:winsock:WS_gethostname name 0x32f2a4, len 256
trace:winsock:WS_gethostname <- 'fusion'
trace:winsock:WS_gethostbyname "fusion" ret 0x16e7d0
trace:winsock:DllMain 0x7dcb0000 0x2 (nil)
trace:winsock:WS2_recvfrom socket 0138, wsabuf 0x32f25c, nbufs 1, flags 0, from (nil), fromlen -1, ovl (nil), func (nil)
trace:winsock:WS2_recvfrom fd=139, options=0
warn:winsock:WS2_recvfrom  -> ERROR 10035
If more output is needed, please tell me.

I found some stuff about some wrong /etc/hosts, mine is here.
The file was generated from ubuntu, but i can modify it by hand if necessary.

Code: Select all

127.0.0.1	localhost
127.0.1.1	fusion

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
fusion is the name of my linux machine wine is running on.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

drunkenchicken wrote:

Code: Select all

trace:winsock:WS_gethostname name 0x32f154, len 256
trace:winsock:WS_gethostname <- 'fusion'
trace:winsock:WS_gethostbyname "fusion" ret 0x16e7d0

Code: Select all

127.0.0.1	localhost
127.0.1.1	fusion
Standard coders mistake. gethostbyname(gethostname()) is invalid on multihommed systems. You need to fix your hosts file to assign your host name to the real IP (the one that faces Internet) not loopback.
drunkenchicken
Level 1
Level 1
Posts: 5
Joined: Tue Nov 09, 2010 5:00 pm

Post by drunkenchicken »

Thanks vitamin for reply.
I changed in /etc/hosts the 2nd line to

Code: Select all

192.168.2.108 fusion
but the same as before, even the debug output of wine.

I checked also the debug output of an working udp programm.
The output looks similar, but i see different socket numbers, pointer adresses. I don't know where this parameters came from, this maybe helps to find a solution.

Code: Select all

trace:winsock:WS_bind socket 0060, ptr 0x32e910 { family AF_INET, address 0.0.0.0, port 9871 }, length 16
trace:winsock:_remap_optname level=65535, optname=32
trace:winsock:WS_setsockopt socket: 0060, level 0xffff, name 0x20, ptr 0x32e968, len 4
trace:winsock:WSAAsyncSelect 60, hWnd 0x100a6, uMsg 00000d10, event 0000003f
trace:winsock:WS_gethostbyname "fusion" ret 0x17dd98
trace:winsock:WS_getsockname socket: 0060, ptr 0x32ea28, len       10
trace:winsock:WS2_sendto socket 0060, wsabuf 0x32e818, nbufs 1, flags 0, to 0x32e884, tolen 16, ovl (nil), func (nil)
trace:winsock:WS2_sendto fd=18, options=0
I should spend more time with the wine manual.
Lets see how many time i will have in the comming week.

Thanks for your time
Olli
ud4fd
Newbie
Newbie
Posts: 1
Joined: Sun Jun 23, 2013 5:46 am

Re: Application is listen to UDP port but no output

Post by ud4fd »

I had the same problem with Win-Test - UDP 10013 error - but it turned out the solution is simple:

run the command: sudo route-C

Code: Select all

root@UD4FD:/# route -C
-----------
Kernel IP routing cache
Source          Destination     Gateway         Flags Metric Ref    Use Iface
localhost       127.0.0.255     127.0.0.255     l     0      0      498 lo
localhost       localhost       localhost       l     0      0        1 lo
192.168.1.202   79.104.54.122   192.168.1.1           0      1        1 eth0
79.104.54.122   192.168.1.202   192.168.1.202   l     0      0      147 lo
192.168.1.202   192.168.1.202   192.168.1.202   l     0      0        0 lo
---
192.168.1.202   239.255.255.250 239.255.255.250 ml    0      0        0 eth0
            ------------ need this -----------------
I am using this addredd 239.255.255.250 in network, telnet and tunel setup - all working in RM4F station in IARU HQ!

Best regards
Alex UD4FD
73!
Locked