From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH]: Can not set the IPV6_PKTINFO option
Date: Mon, 16 Jul 2007 13:41:23 +0100 [thread overview]
Message-ID: <200707161341.23419@strip-the-willow> (raw)
[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;
next reply other threads:[~2007-07-16 12:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 12:41 Gerrit Renker [this message]
2007-07-16 12:56 ` [PATCH]: Can not set the IPV6_PKTINFO option 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 / 吉藤英明
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707161341.23419@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.