#6299 HIGH Never A: presence service should disable salut in the presence of school servers on mesh

Zarro Boogs per Child bugtracker at laptop.org
Mon Feb 11 09:36:33 EST 2008


#6299: presence service should disable salut in the presence of school servers on
mesh
-------------------------------+--------------------------------------------
  Reporter:  robot101          |       Owner:  Collabora     
      Type:  defect            |      Status:  new           
  Priority:  high              |   Milestone:  Never Assigned
 Component:  presence-service  |     Version:                
Resolution:                    |    Keywords:  Update.1?     
  Verified:  0                 |    Blocking:                
 Blockedby:                    |  
-------------------------------+--------------------------------------------

Comment(by dcbw):

 The idea was that the anycast addresses could change if the local
 deployment had a need for them to change.  The problem is that you don't
 necessarily know what the anycast address for the school server will be at
 the start, unless you want to parse SYSCONFDIR
 "/NetworkManager/anycast.conf", which seems pretty ugly.

 A completely different solution would be to check if msh0 has a
 169.254.*.* LL IPv4 address, and if _not_, stop doing any mDNS.
 NetworkManager will only assign a routable (well, non-LL IPv4 address) to
 the mesh interface when there is no school server found, which implies
 that the anycast stuff already failed.  So a LL IPv4 address means "do
 mDNS", while a non-LL address means "don't do mDNS".  With this solution
 you wouldn't have to do anything except run an SIOCGIFCONF ioctl, which is
 a *boatload* less code for you to write and a lot less stuff to go wrong.
 If you want to get really slick, you could either listen to D-Bus events
 from NM, or listen to netlink interface change events like Avahi does to
 find out when the interface's address changes, and when the interface goes
 up and down.  While netlink isn't simple, it's pretty straightforward
 packet-parsing code once it's tied in with your event loop to read the
 netlink socket.

-- 
Ticket URL: <http://dev.laptop.org/ticket/6299#comment:4>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list