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

Jean-Yves Avenard jyavenard at gmail.com
Fri Jun 28 06:33:56 UTC 2013


On 27 June 2013 09:20, Raymond Wagner <raymond at wagnerrp.com> wrote:

> That line was added here...
>
> http://code.mythtv.org/cgit/mythtv/diff/mythtv/libs/libmythbase/serverpool.cpp?id=34c46f19
>
> ...which would suggest it was correcting for an issue where MythTV would
> fail to bind to addresses on interfaces that were not yet running. It is
> possible merely checking for IsUp would have the same effect.

As the author of that change I can explain..

Trying to bind on an interface that doesn't exist or is inactive
*will* fail (at least Qt will error out)

As the ServerPool class requires by default for all binds to succeed
otherwise it errors out early, should we have tried to bind on a
listed address, but non-active ; everything would have stopped
working.

The core reason for testing if an interface is up is that we try to
bind on all link-local addresses; and all hardware interfaces have
one, even when not active. As mentioned above, and I repeat: if you
try to bind on those link-local addresses it would fail and ServerPool
bind operation would exit early and your backend would be unusable.


At the end of the day, get a $8 switch as recommended earlier, problem
solved. Or of course, the original poster is welcomed to raise a
bounty required for the several hours of development that would be
required to get around this particularly unique problem.
I think a $8 switch is more economical :)


More information about the mythtv-users mailing list