lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3790c0cc-f6da-6e45-e478-3b26bb085719@oneaccess-net.com>
Date:   Wed, 7 Dec 2016 14:34:57 +0100
From:   Renata Saiakhova <Renata.Saiakhova@...access-net.com>
To:     <linux-kernel@...r.kernel.org>
Subject: IPV6_PKTINFO socket option

Hi all,

I would like to use IPV6_PKTINFO option to specify an outgoing IPv6 
address in sendmsg(). The socket is not bound neither to an address nor 
to an interface. Should I always specify ifindex together with source 
address?

(according to rfc3542 :

The kernel must verify that the requested source address is indeed a 
unicast address assigned to the node. When the address is a scoped one, 
there may be ambiguity about its scope zone. This is particularly the 
case for link-local addresses. In such a case, the kernel must first 
determine the appropriate scope zone based on the zone of the 
destination address or the outgoing interface (if known), then qualify 
the address. This also means that it is not feasible to specify the 
source address for a non-binding socket by the IPV6_PKTINFO sticky 
option, unless the outgoing interface is also specified. The application 
should simply use bind() for such purposes. )

It looks somewhat ambiguous, for me it is not clear, should ifindex be 
always specified, suppose, for global addresses?

I looked at linux kernel implementation as a reference, and it seems 
that this sticky option information is stored in ipv6_pinfo structure, 
but only ipi6_ifindex is used while constructing i6 flow in 
udpv6_sendmsg. ipi6_addr part is used only in getsockopt to return this 
information. Why ipi6_addr is not used in constructing i6 flow?

Kind regards,

Renata

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ