Netdev List
 help / color / mirror / Atom feed
* [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

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