meh / rust-tun

TUN device creation and handling.
343 stars 136 forks source link

IPv6 support #4

Open vorner opened 6 years ago

vorner commented 6 years ago

Hello

I just needed a TAP device crate and only after writing one myself, I discovered this, which seems to be richer in features than mine (mine is just raw pipe for packets, without any configuration of the interface). However, reading the documentation, it seems this completely lacks any IPv6 consideration.

Is it planned or is that on purpose?

meh commented 6 years ago

It's not planned, it's wanted, the problem is you need to go through a netlink socket to set up IPv6 addresses and I really do not want to implement that.

Also keep in mind this is only for TUN interfaces, the plan was to also make a TAP crate.

vorner commented 6 years ago

So, if I understand you correctly, if someone wrote a crate that could manipulate arbitrary interface's addresses (and maybe other things), you could then use that as dependency of both this and the yet unwritten TAP crate to provide that functionality? I guess setting the addresses on TUN would be exactly the same as setting it on other interfaces.

meh commented 6 years ago

Yeah, that was the initial plan, then I saw how much stuff you needed to set IPv6 addresses on Linux, and I don't even want to know how much churn there would be to support more than that.

It may actually be more feasible to wrap the various route/ip/whatever commands than going the native way to be honest.