* IPV6_PKTINFO socket option
@ 2007-08-08 11:16 Gerrit Renker
2007-08-08 22:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Gerrit Renker @ 2007-08-08 11:16 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
Yoshifuji-san,
a few weeks earlier I enquired about the IPV6_PKTINFO socket option to get at the
destination address of datagrams, where you replied that this option is `deprecated'.
There are three problems:
1. On i386 it works as described in section 4 of RFC 3542, using IPV6_RECVPKTINFO
as sticky socket option to pull out the IPV6_PKTINFO cmsg header fields.
2. On sparc64 with the same kernel IPV6_PKTINFO works without problems, even pulls
out the cmsg fields correctly. Conversely, when trying to set the IPV6_RECVPKTINFO
sticky option on the socket, no cmsg fields are generated.
The kernel is of the same date and revision as the i386 kernel - library issue ???
It is very annoying, since the application needs to run on both architectures.
3. Misc:
* The option is mentioned 9 times in the index of "Unix Network Programming"
(3rd ed., p. 969). Moreover, an entire section (27.7) is devoted to this topic.
* It might be good to give at least a warning message in the syslog that the
IPV6_PKTINFO socket option is no longer supported. That would save many users
grief. An example how this was done in DCCP is in net/dccp/proto.c:
case DCCP_SOCKOPT_PACKET_SIZE:
DCCP_WARN("sockopt(PACKET_SIZE) is deprecated: fix your app");
Maybe this is due to a misunderstanding - in which case I'd be grateful for any clarifications.
Thanks
Gerrit
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: IPV6_PKTINFO socket option
2007-08-08 11:16 IPV6_PKTINFO socket option Gerrit Renker
@ 2007-08-08 22:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-08-08 22:02 UTC (permalink / raw)
To: gerrit; +Cc: yoshfuji, netdev
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Wed, 8 Aug 2007 12:16:51 +0100
> 2. On sparc64 with the same kernel IPV6_PKTINFO works without problems, even pulls
> out the cmsg fields correctly. Conversely, when trying to set the IPV6_RECVPKTINFO
> sticky option on the socket, no cmsg fields are generated.
> The kernel is of the same date and revision as the i386 kernel - library issue ???
> It is very annoying, since the application needs to run on both architectures.
Almost certainly a compat layer bug in the kernel, it would
affect 32-bit applications on powerpc64 and similar if so.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-08 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 11:16 IPV6_PKTINFO socket option Gerrit Renker
2007-08-08 22:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).