[sugar] [PATCH] Trac #34: IPv6 support for _get_local_ip_address.
Mon Sep 11 11:49:59 EDT 2006
On Sun, 2006-09-10 at 19:53 +0100, Chris Ball wrote:
> The sugar function _get_local_ip_address attempts to find the local IP
> address by using the SIOCGIFADDR ioctl on the network interface. This
> will always provide an IPv4 address, regardless of which protocol is in
> use; this patch modifies _get_local_ip_address to take protocol into
> account, using SIOCGIFADDR for IPv4 and /proc/net/if_inet6 for IPv6.
> The patch fixes the following error when sharing an activity over IPv6:
Are you explicitly passing in an ipv6 address when sharing the activity?
Other work that needs doing is switching Avahi over to ipv6 by replacing
avahi.PROTO_UNSPEC with avahi.PROTO_INET6, and adding "ip6_address" dict
items to the properties of all the PS objects in place of where
"ip4_address" is now.
> sugar-presence-service (6429): Level 10 - resolved service 'cjb [38a0b98587c1d8fb1ad29722a4f14f1f00f4e7b5]' type '_olpc_model._tcp' domain 'local' to fe80::213:d3ff:fe4e:5cb6:29989
> sugar-presence-service (6429): Level 40 - Service source and buddy address doesn
> 't match: fe80::213:d3ff:fe4e:5cb6 None
> sugar-presence-service (6429): Level 40 - Traceback (most recent call last):
> File "/home/cjb/cvs/sugar-jhbuild/build/share/sugar/shell/PresenceService/Pres
> enceService.py", line 466, in _resolve_service_reply_cb
> File "/home/cjb/cvs/sugar-jhbuild/build/share/sugar/shell/PresenceService/PresenceService.py", line 410, in _handle_new_activity_service
> File "/home/cjb/cvs/sugar-jhbuild/build/share/sugar/shell/PresenceService/Activity.py", line 146, in add_service
> buddies = self.get_joined_buddies()
> File "/home/cjb/cvs/sugar-jhbuild/build/share/sugar/shell/PresenceService/Activity.py", line 129, in get_joined_buddies
> if not owner in buddies and owner.is_valid():
> AttributeError: 'NoneType' object has no attribute 'is_valid'
> This is my first sugar patch, so please feel free to ask questions or
> give feedback. As mentioned in <http://dev.laptop.org/ticket/34>,
> there may be more work needed to have sugar fully working under IPv6.
> - Chris.
> Sugar mailing list
> Sugar at laptop.org
More information about the Sugar-devel