On Tue, Jan 1, 2013 at 7:34 PM, Jerry Vonau <jvo...@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 <jvo...@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.
_______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel