* [PATCH]: Can not set the IPV6_PKTINFO option
@ 2007-07-16 12:41 Gerrit Renker
2007-07-16 12:56 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 8+ messages in thread
From: Gerrit Renker @ 2007-07-16 12:41 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
[IPv6]: Can not set the IPV6_PKTINFO option
The Linux manpage of ipv6(7) mentions the IPV6_PKTINFO option (and it is defined in header
files), but there is no setsockopt support for it. Aliasing to IPV6_RECVPKTINFO fixes this,
and checking datagram_recv_ctl() in net/ipv6/datagram.c confirms that this works as
expected from the API.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -315,6 +315,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
retv = 0;
break;
+ case IPV6_PKTINFO:
case IPV6_RECVPKTINFO:
np->rxopt.bits.rxinfo = valbool;
retv = 0;
@@ -928,6 +929,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
val = np->ipv6only;
break;
+ case IPV6_PKTINFO:
case IPV6_RECVPKTINFO:
val = np->rxopt.bits.rxinfo;
break;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 12:41 [PATCH]: Can not set the IPV6_PKTINFO option Gerrit Renker
@ 2007-07-16 12:56 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 13:07 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 8+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-07-16 12:56 UTC (permalink / raw)
To: gerrit; +Cc: davem, netdev, yoshfuji
In article <200707161341.23419@strip-the-willow> (at Mon, 16 Jul 2007 13:41:23 +0100), Gerrit Renker <gerrit@erg.abdn.ac.uk> says:
> [IPv6]: Can not set the IPV6_PKTINFO option
>
> The Linux manpage of ipv6(7) mentions the IPV6_PKTINFO option (and it is defined in header
> files), but there is no setsockopt support for it. Aliasing to IPV6_RECVPKTINFO fixes this,
> and checking datagram_recv_ctl() in net/ipv6/datagram.c confirms that this works as
> expected from the API.
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
NAK. It is obsolete.
--yoshfuji
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 12:56 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-07-16 13:07 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 13:38 ` Gerrit Renker
0 siblings, 1 reply; 8+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-07-16 13:07 UTC (permalink / raw)
To: gerrit; +Cc: davem, netdev, yoshfuji
In article <20070716.215605.106156812.yoshfuji@linux-ipv6.org> (at Mon, 16 Jul 2007 21:56:05 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> says:
> In article <200707161341.23419@strip-the-willow> (at Mon, 16 Jul 2007 13:41:23 +0100), Gerrit Renker <gerrit@erg.abdn.ac.uk> says:
>
> > [IPv6]: Can not set the IPV6_PKTINFO option
> >
> > The Linux manpage of ipv6(7) mentions the IPV6_PKTINFO option (and it is defined in header
> > files), but there is no setsockopt support for it. Aliasing to IPV6_RECVPKTINFO fixes this,
> > and checking datagram_recv_ctl() in net/ipv6/datagram.c confirms that this works as
> > expected from the API.
> >
> > Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
>
> NAK. It is obsolete.
I meant, the manpage is outdated.
Current IPV6_PKTINFO is not equal to IPV6_RECVPKTINFO
but a sticky option to set source address / interface
for outgoing packet.
--yoshfuji
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 13:07 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2007-07-16 13:38 ` Gerrit Renker
2007-07-16 14:02 ` Herbert Xu
0 siblings, 1 reply; 8+ messages in thread
From: Gerrit Renker @ 2007-07-16 13:38 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: netdev
Quoting YOSHIFUJI Hideaki / 吉藤英明:
| Current IPV6_PKTINFO is not equal to IPV6_RECVPKTINFO
| but a sticky option to set source address / interface
| for outgoing packet.
Thanks for the update, but there is no `current' IPV6_PKTINFO - set/getsockopt()
on this will result in ENOPROTOOPT.
Manpage date says 1999-06-29 but in fact manpages are from up-to-date lenny/sid.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 13:38 ` Gerrit Renker
@ 2007-07-16 14:02 ` Herbert Xu
2007-07-16 14:14 ` Gerrit Renker
2007-07-16 14:17 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 2 replies; 8+ messages in thread
From: Herbert Xu @ 2007-07-16 14:02 UTC (permalink / raw)
To: Gerrit Renker; +Cc: yoshfuji, netdev
Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
>
> Manpage date says 1999-06-29 but in fact manpages are from up-to-date lenny/sid.
I think Yoshifuji-san's point is not that your manpages package
is out-of-date, but that the manpage itself is out-of-date.
That is, someone needs to send a patch to the upstream manpages
maintainer and fix the documentation to actually describe what the
code does.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 14:02 ` Herbert Xu
@ 2007-07-16 14:14 ` Gerrit Renker
2007-07-16 14:25 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 14:17 ` YOSHIFUJI Hideaki / 吉藤英明
1 sibling, 1 reply; 8+ messages in thread
From: Gerrit Renker @ 2007-07-16 14:14 UTC (permalink / raw)
To: Herbert Xu; +Cc: yoshfuji, netdev
| That is, someone needs to send a patch to the upstream manpages
| maintainer and fix the documentation to actually describe what the
| code does.
|
If it is simply replacing IPV6_PKTINFO with IPV6_RECVPKTINFO then I'd be happy to do this.
Anything more complicated than that - it would be good to have some of the developers taking
a look.
Here is the text of the manpage (ipv6 in section 7):
IPV6_PKTINFO
Set delivery of the IPV6_PKTINFO control message on incoming datagrams.
Only allowed for SOCK_DGRAM or SOCK_RAW sockets. Argument is a pointer to a
boolean value in an integer.
The v4 IP_PKTINFO works in the same way as the above description.
Gerrit
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 14:02 ` Herbert Xu
2007-07-16 14:14 ` Gerrit Renker
@ 2007-07-16 14:17 ` YOSHIFUJI Hideaki / 吉藤英明
1 sibling, 0 replies; 8+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-07-16 14:17 UTC (permalink / raw)
To: herbert, gerrit; +Cc: netdev, yoshfuji
In article <E1IAR9h-0007nr-00@gondolin.me.apana.org.au> (at Mon, 16 Jul 2007 22:02:29 +0800), Herbert Xu <herbert@gondor.apana.org.au> says:
> Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> >
> > Manpage date says 1999-06-29 but in fact manpages are from up-to-date lenny/sid.
>
> I think Yoshifuji-san's point is not that your manpages package
> is out-of-date, but that the manpage itself is out-of-date.
> That is, someone needs to send a patch to the upstream manpages
> maintainer and fix the documentation to actually describe what the
> code does.
Exactly. The ipv6(7) manpage is one of the TODOs.
Contributions, expecially from native speakers, are really welcome.
--yoshfuji
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH]: Can not set the IPV6_PKTINFO option
2007-07-16 14:14 ` Gerrit Renker
@ 2007-07-16 14:25 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 0 replies; 8+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-07-16 14:25 UTC (permalink / raw)
To: gerrit; +Cc: herbert, netdev, yoshfuji
In article <200707161514.06324@strip-the-willow> (at Mon, 16 Jul 2007 15:14:06 +0100), Gerrit Renker <gerrit@erg.abdn.ac.uk> says:
> | That is, someone needs to send a patch to the upstream manpages
> | maintainer and fix the documentation to actually describe what the
> | code does.
> |
> If it is simply replacing IPV6_PKTINFO with IPV6_RECVPKTINFO then I'd be happy to do this.
> Anything more complicated than that - it would be good to have some of the developers taking
> a look.
>
> Here is the text of the manpage (ipv6 in section 7):
>
> IPV6_PKTINFO
> Set delivery of the IPV6_PKTINFO control message on incoming datagrams.
> Only allowed for SOCK_DGRAM or SOCK_RAW sockets. Argument is a pointer to a
> boolean value in an integer.
Description is outdated (RFC2292).
Current Linux basically follows RFC3542.
--yoshfuji
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-07-16 14:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-16 12:41 [PATCH]: Can not set the IPV6_PKTINFO option Gerrit Renker
2007-07-16 12:56 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 13:07 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 13:38 ` Gerrit Renker
2007-07-16 14:02 ` Herbert Xu
2007-07-16 14:14 ` Gerrit Renker
2007-07-16 14:25 ` YOSHIFUJI Hideaki / 吉藤英明
2007-07-16 14:17 ` YOSHIFUJI Hideaki / 吉藤英明
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).