[Sugar-devel] [TRANSIENT] Peer XOs NOT shown in Neighborhood view when Power Management is enabled

Samuel Greenfeld greenfeld at laptop.org
Wed Jan 2 10:35:20 EST 2013


On Wed, Jan 2, 2013 at 10:21 AM, Paul Fox <pgf at laptop.org> wrote:

> samuel wrote:
>  > On Tue, Jan 1, 2013 at 7:34 PM, Jerry Vonau <jvonau at shaw.ca> wrote:
>  >
>  > > On Wed, 2012-12-19 at 09:48 -0500, Martin Langhoff wrote:
>  > > > On Wed, Dec 19, 2012 at 5:14 AM, Jerry Vonau <jvonau at shaw.ca>
> wrote:
>  > > > > Think I found the problem, in powerd we're setting WOL based on
> this
>  > > > > string:
>  > > > >
>  > > > > if grep -qi ": 00000000:14B2" /proc/net/tcp
>  > > > >
>  > > > > but that string is not present in /proc/net/tcp so WOL is not set
>  > > > > according to ethtool, but that string can be found in
> /proc/net/tcp6
>  > > > >
>  > > > > avahi is bound to tcp6 when viewed with 'netstat -nat'
>  > > > >
>  > > > > This is reproducible in 12.1.0 and 13.1.0
>  > > >
>  > > > Arghhh. Ouch.
>  > > >
>  > > > Does it behave better with:
>  > > >
>  > > >   if grep -qi ": 00000000:14B2" /proc/net/tcp*
>  > >
>  >
>  > This does not work because IPv6 addresses are longer (and therefore have
>  > more octets).
>  >
>  > The variant I came up with (if we want to support both v4 and v6
> listeners)
>  > is
>  >
>  > if grep -qiE ": 00000000+:14B2" /proc/net/tcp?
>  >
>  > Simply removing the ": " check on its own might be sufficient for our
>  > purposes but could falsely return true in a few cases.
>  >
>  > If IPv4 backward compatibility on the listener check is not a concern,
> then
>  > you should just match on the longer string of zeros:14B6 in
> /proc/net/tcp6
>  > and not check both files for speed.
>
> why would ipv4 backward compatibility not be a concern?
>

The ::0 (0.0.0.0 in IPv4 netstat speak) listener for telepathy-salut is
bound on the IPv6 socket, but still handles IPv4 requests.  So just
/proc/net/tcp6 can be looked at in 13.1.0/Fedora 18 as we ship it.

But if there is an option to tell telepathy-salut to bind to 0.0.0.0
instead of ::0 and force the listener to use IPv4 binding, then both
/proc/net/tcp and /proc/net/tcp6 have to be checked if we wanted to be
backward-compatible, or just paranoid in case something we don't know or
don't expect can tell telepathy-salut to do that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130102/3d276d81/attachment.html>


More information about the Sugar-devel mailing list