maemo-leste / bugtracker

Issue tracking repository
62 stars 3 forks source link

Reverse engineering libicd-network-ipv6 #139

Open MerlijnWajer opened 6 years ago

MerlijnWajer commented 6 years ago

See http://talk.maemo.org/showthread.php?t=85357 for more info

parazyd commented 3 years ago
21:43 <Pali> I will try to explain state of ipv6 support...
21:44 <Pali> * obviously you need kernel with ipv6 support, stock nokia did not have, kernel-power was needed
21:46 <Pali> * for address assignment there are multiple independent options (and can be combined): static/manual, RA/SLAAC, DHCPv6-statefull (assigns one address, but can also more are possibles), DHCPv6-PD (assigns prefix of addresses)
21:46 <Pali> * for gateway/router assignment there is only one option: RA
21:47 <Pali> * for DNS server assignment there are multiple independent options and can be combined: static/manual, RA, DHCPv6-stateless, DHCPv6-statefull (part of address asignment)
21:48 <Pali> RA/SLAAC part is implemented in kernel, just needs to be enabled via sysctl and kernel automatically assigns SLACC address to interface
21:48 <Pali> for DNS server from RA, kernel exports it via netlink interface, so userspace can read it and overwrite /etc/resolv.conf
21:49 <Pali> all DHCPv6 modes are implemented in userspace and there are more implementations
21:50 <Pali> RA packet also inform about existance of DHCPv6 and also which modes of DHCPv6 are supported... so userspace needs to listen for RA packets, parse them and start DHCPv6 as required
21:51 <Pali> in maemo fremantle as DHCPv6 client was used "wide" and for detecting of DHCPv6 mode was used custom nokia c application (open source)
21:52 <Pali> integration of starting this application and dhcpv6 client into icd was done by that close source plugin
21:52 <Pali>  DHCPv6-PD mode was not supported
21:56 <Pali> in maemo there is ipv6-support which depends on all those required software, plus in its scripts it enable (disabled) ipv6 support in random nokia/fremantle applications
22:01 <Pali> I have written software daemon which listen for RA packets and when "state" changes it can start script with info in env what was changed
22:01 <Pali> it can be used e.g. to automaticaly start dhcpv6 client (in required mode), or updating /etc/resolv.conf
22:01 <Pali> daemon puts all required data to env variables prior spawning user script
22:03 <Pali> I can provide you this my daemon (under GPL) if you think it can be useful
22:04 <Pali> but if you are going to strictly mimic libicd-network-ipv6 behavior with nokia open source c application (osso-rtsol) and helper scripts around in libicd-network-ipv6-script then I think you do not need it
22:08 <parazyd> Is it viable to RE libicd-network-ipv6 ?
22:11 <Pali> I do not know details of icd daemon
22:11 <Pali> for sure you need some plugin which integrates it... but if writing it from zero is better and easier then RE this binary I'm not sure
MerlijnWajer commented 2 years ago

I took a quick look and it's a small library (20KB), so it's probably doable in 1-2 days.