Subject: Re: IPv6 capable tun
To: None <>
From: Michael Richardson <>
List: tech-net
Date: 01/08/2001 09:17:32
>>>>> "itojun" == itojun  <> writes:
    >> I understand that one reason why tun0 does not support IPv6 is that
    >> it does not support multicast. I can live without neighbour discovery
    >> messages and stuff, and I think I have the right code otherwise.
    >> Are there other downsides of setting IF_MULTICAST on the tun interface?
    >> I've sent a PR on this. 

    itojun> 	what did you do about TUN_PREPADDR (TUNSLMODE)?

  On ingress (data written to tun0), one prepends a sockaddr of some kind. The
only use of this is to determine the addressing family (e.g. which queue to
use). I extended the switch statement to look for AF_INET6. If you aren't
in TUNSLMODE, then I peek at the first bype to see of it is 0x4x or 0x6x.

  On egress, the destination address is again a sockaddr, so it does the
right thing. I haven't tested with TUNSLMODE yet. I should probably be using
it for my protocol.

  The situation that I don't know how to deal with is the BPF case.

] Train travel features AC outlets with no take-off restrictions|gigabit is no[
]   Michael Richardson, Solidum Systems   Oh where, oh where has|problem  with[
]   the little fishy gone?|PAX.port 1100[
] panic("Just another NetBSD/notebook using, kernel hacking, security guy");  [