rootlesskit
rootlesskit copied to clipboard
Support IPv6 in address assignment and gateway
Rootlesskit assigns ipv4 address and routes for ipv4, but not for ipv6, this PR address IPv6 issue.
Some tools like slirp4netns could assign ip address, routes, but rootlesskit doesn't request them to do it.
Couple clues:
- Interface address and gateway should be received from e.g. slirp4netns. There is already a comment on it in code. Need to fix slirp4netns and others.
- Setting static IPv6 address fd00::1 to tap0 looks weired, since e.g. slirp4netns already could give dynamic address from fd00::/64 network, but there is a race. Rootlesskit can't set default route via fd00::2 unless IPv6 address and route from fd00::/64 is set to tap0.