Bug 34061 - Only binds to one random IP
Only binds to one random IP
Product: UCS
Classification: Unclassified
Component: UCS Net Installer
UCS 4.1
All Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Philipp Hahn
Daniel Tröder
Depends on:
  Show dependency treegraph
Reported: 2014-02-05 17:29 CET by Philipp Hahn
Modified: 2016-02-11 14:01 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): IPv6, Usability
Max CVSS v3 score:
hahn: Patch_Available+

Listen to INADDR_ANY (894 bytes, patch)
2014-02-05 17:29 CET, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-02-05 17:29:39 CET
Created attachment 5777 [details]
Listen to INADDR_ANY

socket.gethostbyname(socket.gethostname()) returns only one (random) address of the host, which leads to univention-net-installer-daemon not being reachable for all addresses:

vm# nc 49173
nc: can't connect to remot (host connection refused

repo# lsof -i :49173 -n
univentio 21372 root    6u  IPv4 685772      0t0  TCP (LISTEN)

repo# tcpdump -i XXXlan0 "tcp port 49173"
17:14:05.405463 IP XX-blade.XXX.de.57753 > xen12.phahn.dev.49173: Flags [S], seq 2622705207, win 14600, options [mss 1460,sackOK,TS val 150303 ecr 0,nop,wscale 7], length 0
17:14:05.405514 IP xen12.phahn.dev.49173 > XXX-blade.XXX.de.57753: Flags [R.], seq 0, ack 2622705208, win 0, length 0
Comment 1 Philipp Hahn univentionstaff 2016-02-02 14:13:30 CET
r67128 | Bug #34061 net: Listen on all interfaces

Package: univention-net-installer
Version: 9.0.1-2.32.201602021402
Branch: ucs_4.1-0
Scope: errata4.1-0

r67129 | Bug #40559,Bug #39937,Bug #38821,Bug #33361,Bug #3406 net: YAML
Comment 2 Daniel Tröder univentionstaff 2016-02-08 12:37:46 CET
OK: advisory
OK: code change
OK: manual tests:

root@ni-m49:~# univention-install univention-net-installer-daemon
Create security/packetfilter/package/univention-net-installer-daemon/tcp/49173/all
Create security/packetfilter/package/univention-net-installer-daemon/tcp/49173/all/en

root@ni-m49:~# lsof -Pni | grep $(pgrep -f univention-net-installer-daemon)
univentio 14392     root    5u  IPv4 398498      0t0  TCP *:49173 (LISTEN)
univentio 14392     root    8u  IPv4 398507      0t0  TCP> (ESTABLISHED)

root@ni-m49:~# ip a | grep 'inet '
    inet scope host lo
    inet brd scope global eth0
    inet scope global docker0

root@ni-m49:~# telnet 49173 
Connected to
root@ni-m49:~# telnet 49173 
Connected to
root@ni-m49:~# telnet 49173 
Connected to

dtroeder@sommar:~$ telnet 49173 
Connected to
Comment 3 Janek Walkenhorst univentionstaff 2016-02-11 14:01:51 CET