question regarding (AF_INET6, SOCK_RAW, IPPROTO_RAW) sockets
Subsystems (2)
Hi,
I've noticed that when using IPv6 raw sockets with IPPROTO_RAW protocol and IPV6_PKTINFO set, we are not allow to specify a source address that it is not configured in the system.
Disabling ipv6_chk_addr in datagram_send_ctl for IPv6 raw sockets seems to fix our problem. Is this approach the right one?
Thanks,
tavi
Le Wednesday 12 March 2008 18:34:29 Octavian Purdila, vous avez écrit :
Quoted 8 lines
Hi,
I've noticed that when using IPv6 raw sockets with
IPPROTO_RAWprotocol andIPV6_PKTINFOset, we are not allow to specify a source address that it is not configured in the system.Disabling
ipv6_chk_addrindatagram_send_ctlfor IPv6 raw sockets seems to fix our problem. Is this approach the right one?
I am a bit confused here. Why would you use IPV6_PKTINFO with a network-layer raw socket? You have to write the IPv6 header anyway, so what useful additional infos would you the ancillary data contain?
Signature · 1 line
Rémi Denis-Courmont
Quoted 4 lines · Rémi Denis-Courmont
I am a bit confused here. Why would you use
IPV6_PKTINFOwith a network-layer raw socket? You have to write the IPv6 header anyway, so what useful additional infos would you the ancillary data contain?
Hi Rémi,
You are right. For some reason (the IPV4 case / man 7 raw) I though that IPV6_PKTINFO is implied when using IPPROTO_RAW but I see now that it is not required.
Thanks,
tavi