17

In an application (voip rtp media server), netstat -na on the server (172.16.226.3 bound to udp port 1286) gives the following line :

udp 0 0 172.16.226.3:1286 172.25.14.11:10000 ESTABLISHED

As an udp connection can not be really "established", it strikes me to see such a line. netstat documentation says that this field is used for tcp connection states, but I am sure that this really is an udp network flow. So : what does it means ? I know (wireshark dump) that my server sends back udp packets from 173.16.226.3:1286 to 172.25.14.11:10000, but I don't see why it should matter...

Os is debian 6.

sarnold
  • 102,305
  • 22
  • 181
  • 238
KWA
  • 858
  • 1
  • 7
  • 10

1 Answers1

26

A UDP socket can be connected via the connect(2) system call, so that the socket will only accept packets from the named peer.

I expect this is the source of the ESTABLISHED column.

sarnold
  • 102,305
  • 22
  • 181
  • 238
  • 6
    Indeed. In Python : `import socket` `sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )` `sock.bind(("172.16.226.3",1086))` `sock.connect(("172.25.14.1",36600))` Gives : `netstat -na | grep 36600` `udp 0 0 172.16.226.3:1086 172.25.14.1:36600 ESTABLISHED` – KWA Jun 01 '12 at 07:48