[mythtv-users] Mythbackend does not bind to IP addresses of interfaces without carrier

Florian Evers florian-evers at gmx.de
Wed Jun 26 15:25:49 UTC 2013


Hi Raymond,

Am Mittwoch, 26. Juni 2013, 08:46:42 schrieb Raymond Wagner:
> On Jun 26, 2013, at 7:54, Florian Evers <florian-evers at gmx.de> wrote:
> > To repeat, the affected interface is "UP" (bot has NO-CARRIER), the
> > IP-address is set, and this IP address can be bound to without any
> > problems. Other deamons are able to bind to this IP address as well. Why
> > does mythbackend refuse to bind as well?
> 
> That's not exactly what is going on.  Other applications bind globally to a
> port.  MythTV binds to specific addresses, and your machine does not have
> that address until the interface is brought up by connecting the ethernet
> cable.

Thanks for your reply. However, your statement is not correct: It is no 
problem to bind a listener socket to the IP address of the inactive interface 
without any issues, e.g., by using netcat:

nc -p 5000 -l -s 192.168.1.1

powerstation florian # netstat -tulpen | grep 192
tcp        0      0 192.168.1.1:5000        0.0.0.0:*               LISTEN      
0          52541      4981/nc

Additionally, on this machine, both "dnsmasq" and "ntpd" bind to 192.168.1.1 
explicitly as well. Applications that are intended to bind globally to a port, 
as you mentioned, listen to 0.0.0.0.

So, this seems to be a different story here... mythbackend COULD bind to 
192.168.1.1, but decides not to do so.

> I've got a modification I'm going to commit that will have MythTV
> periodically rescan for changes in connectivity, and re-bind accordingly,
> however these changes will not be in until 0.27.

Sounds nice, thank you very much! But I'm not sure yet if this aims at the 
real issue... then, as long as the interface was never active before, it is 
impossible to access mythbackend at IP address 192.168.1.1, which is used by 
mythweb in my setup. This would be the expected behavior, and netcat 
underlines that.

Regards,
Florian


More information about the mythtv-users mailing list