Bug 34061 - Only binds to one random IP
Only binds to one random IP
Status: CLOSED FIXED
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:
Blocks:
  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+


Attachments
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 184.1.3.1 49173
nc: can't connect to remot (host 184.1.3.1): connection refused


repo# lsof -i :49173 -n
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
univentio 21372 root    6u  IPv4 685772      0t0  TCP 192.168.0.135:49173 (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
 univention-net-installer.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 10.200.3.49:44464->10.200.3.49:7389 (ESTABLISHED)

root@ni-m49:~# ip a | grep 'inet '
    inet 127.0.0.1/8 scope host lo
    inet 10.200.3.49/24 brd 10.200.3.255 scope global eth0
    inet 172.17.42.1/16 scope global docker0

root@ni-m49:~# telnet 127.0.0.1 49173 
Connected to 127.0.0.1.
root@ni-m49:~# telnet 10.200.3.49 49173 
Connected to 10.200.3.49.
root@ni-m49:~# telnet 172.17.42.1 49173 
Connected to 172.17.42.1.

dtroeder@sommar:~$ telnet 10.200.3.49 49173 
Connected to 10.200.3.49.
Comment 3 Janek Walkenhorst univentionstaff 2016-02-11 14:01:51 CET
<http://errata.software-univention.de/ucs/4.1/108.html>