: Can not set the IPV6_PKTINFO option
Subsystems (3)
PATCH 1/1 : Can not set the IPV6_PKTINFO option
[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.
---
net/ipv6/ipv6_sockglue.c +2 -0
@@ -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 ;
In article <200707161341.23419@strip-the-willow> (at Mon, 16 Jul 2007 13:41:23 +0100), Gerrit Renker <[email protected]> says:
Quoted 8 lines
[IPv6]: Can not set the
IPV6_PKTINFOoptionThe Linux manpage of ipv6(7) mentions the
IPV6_PKTINFOoption (and it is defined in header files), but there is no setsockopt support for it. Aliasing toIPV6_RECVPKTINFOfixes this, and checkingdatagram_recv_ctl()innet/ipv6/datagram.cconfirms that this works as expected from the API.Signed-off-by Gerrit Renker <[email protected]>
NAK. It is obsolete.
--yoshfuji
In article <[email protected]> (at Mon, 16 Jul 2007 21:56:05 +0900 (JST)), YOSHIFUJI Hideaki / 吉藤英明 <[email protected]> says:
Quoted 4 lines
In article <200707161341.23419@strip-the-willow> (at Mon, 16 Jul 2007 13:41:23 +0100), Gerrit Renker <[email protected]> says:
Quoted 2 lines
[IPv6]: Can not set the
IPV6_PKTINFOoption
Quoted 8 lines
Quoted 6 lines
The Linux manpage of ipv6(7) mentions the
IPV6_PKTINFOoption (and it is defined in header files), but there is no setsockopt support for it. Aliasing toIPV6_RECVPKTINFOfixes this, and checkingdatagram_recv_ctl()innet/ipv6/datagram.cconfirms that this works as expected from the API.Signed-off-by Gerrit Renker <[email protected]>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
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.
Quoted 2 lines · Gerrit Renker
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,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt| 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
In article <200707161514.06324@strip-the-willow> (at Mon, 16 Jul 2007 15:14:06 +0100), Gerrit Renker <[email protected]> says:
Quoted 8 lines
| 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_PKTINFOwithIPV6_RECVPKTINFOthen 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.
Quoted 6 lines
Here is the text of the manpage (ipv6 in section 7):
IPV6_PKTINFO
Set delivery of theIPV6_PKTINFOcontrol message on incoming datagrams. Only allowed forSOCK_DGRAMorSOCK_RAWsockets. Argument is a pointer to a boolean value in an integer.
Description is outdated (RFC2292).
Current Linux basically follows RFC3542.
--yoshfuji
In article <[email protected]> (at Mon, 16 Jul 2007 22:02:29 +0800), Herbert Xu <[email protected]> says:
Quoted 9 lines
Quoted 2 lines · Gerrit Renker
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