[mythtv] [mythtv-commits] mythtv/master commit: 50606cd50 by Stuart Morgan (stuartm)

E. Westbrook mythtv-dev at westbrook.com
Sun Aug 14 13:56:28 UTC 2011


On Thu, Aug 11, 2011 at 16:11, MythTV <noreply at mythtv.org> wrote:

>      Author:  Stuart Morgan <smorgan at mythtv.org>
>  Change Date:  2011-08-11T14:05:00-07:00
>   Push Date:  2011/08/11 15:10:55 -0700
>  Repository:  mythtv
>      Branch:  master
> New Revision:  50606cd50a7f1e951d5bdec4ffbb9c137bbbc5c2
>   Changeset:  https://github.com/MythTV/mythtv/commit/50606cd50
>
> Log:
>
> Always use the loopback interface when local
>
> If the backend is local to the frontend then we will always use the
> loopback interface instead of connecting on the external IP. This adds
> some resilience to setups where the network connection may drop, e.g.
> using wifi - especially Ubuntu which removes the IP from the interface
> if it detects that the network is unreachable.
>
> Modified:
>
>   mythtv/libs/libmythbase/mythsocket.cpp
>   mythtv/libs/libmythbase/mythsocket.h
>


This commit breaks my system.  MythTV tries localhost instead of what I've
explicitly told it to.

I configure services with specific addresses on specific interfaces as part
of my overall network and security policy framework.  Some of these are
local, some are not, and all are subject to change if my policy needs them
to.  Specifically, I configure all services (that I can) to NOT listen on
wildcard or loopback addresses.

As long as everything does what it's configured to do, everything's great.

But now, MythTV won't do what it's asked to do.

You see, MySQL honors my configuration, doesn't listen on wildcard or
loopback, and so this patch causes both mythfrontend and mythbackend to fail
-- because they now refuse to connect to the address that I've explicitly
told them to use.

If someone has trouble keeping an IP address available, they should fix it,
shouldn't they?  And if they can't, then they can certainly themselves tell
MythTV to use loopback, can't they?  I certainly appreciate the good
intentions of helping them out, but I don't think it warrants a reduction in
adherence to configuration.

Now, with that said -- it might not be a bad idea to *offer* to insert the
loopback address, during configuration, if the address given is detected as
local.  Or, as an option I still dread, try the loopback address if the
destination seems local *and* fails to connect (I dread that alternative,
because if MythTV can't find my configured address, I really do want to see
an error thrown, and thrown hard.)

But, please, whatever we do, let's not unilaterally disregard addresses that
have been explicitly specified.

Please revert!

Thanks,
Eric

(Aside:  I do patch mythbackend to (optionally) not listen on the wildcard
address, but I don't have any plans to submit that particular work -- for
the simple reason that, if done right, it adds a checkbox to the
configuration user interface, and I know we're trying to minimize that.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-dev/attachments/20110814/d9e7cb92/attachment.html 


More information about the mythtv-dev mailing list