Re: IPv6 link local

[email protected] (Niels Möller) Thu, 18 Dec 2014 13:06:51 +0100
Newsgroups gmane.network.lsh.bugs
Message-ID <[email protected]>
Sylvain BERTRAND <[email protected]> writes:

> Is there a way to tell lsh about the interface to use when using a link l=
ocal IPv6 address?

No, it just calls connect on the target ip address, and relies on the
kernel to select an appropriate src address and interface.

> For instance an --interface option or IPV6%iface syntax.

Hmm. Adding an interface option to specify an ip address, and using
bind(2) to bind that as the local address of the socket before
connecting, should be straightforward.

Not sure how to deal with interface identifiers, though. How should that
work? I'm aware of the SO_BINDTODEVICE setsockopt, but I'm not sure
that's what you are asking for.

Regards,
/Niels

-- =

Niels M=F6ller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.