mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: "YOSHIFUJI Hideaki / ____________" <yoshfuji@linux-ipv6.org>
Cc: mitch@sfgoth.com, kernel@linuxace.com, davem@davemloft.net,
	linux-net@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@oss.sgi.com, yoshfuji@linux-ipv6.org
Subject: [PATCH] fix select() for SOCK_RAW sockets (ipv6)
Date: Tue, 7 Dec 2004 10:01:40 -0800	[thread overview]
Message-ID: <20041207100140.781f4c00@dxpl.pdx.osdl.net> (raw)
In-Reply-To: <20041208.023530.26430801.yoshfuji@linux-ipv6.org>

> Probably, we need to do the same for ipv6, don't we?

diff -Nru a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
--- a/net/ipv6/af_inet6.c	2004-12-07 10:02:50 -08:00
+++ b/net/ipv6/af_inet6.c	2004-12-07 10:02:50 -08:00
@@ -513,6 +513,27 @@
 	.sendpage =	sock_no_sendpage,
 };
 
+struct proto_ops inet6_raw_ops = {
+	.family =	PF_INET6,
+	.owner =	THIS_MODULE,
+	.release =	inet6_release,
+	.bind =		inet6_bind,
+	.connect =	inet_dgram_connect,		/* ok		*/
+	.socketpair =	sock_no_socketpair,		/* a do nothing	*/
+	.accept =	sock_no_accept,			/* a do nothing	*/
+	.getname =	inet6_getname, 
+	.poll =		datagram_poll,			/* ok		*/
+	.ioctl =	inet6_ioctl,			/* must change  */
+	.listen =	sock_no_listen,			/* ok		*/
+	.shutdown =	inet_shutdown,			/* ok		*/
+	.setsockopt =	sock_common_setsockopt,		/* ok		*/
+	.getsockopt =	sock_common_getsockopt,		/* ok		*/
+	.sendmsg =	inet_sendmsg,			/* ok		*/
+	.recvmsg =	sock_common_recvmsg,		/* ok		*/
+	.mmap =		sock_no_mmap,
+	.sendpage =	sock_no_sendpage,
+};
+
 static struct net_proto_family inet6_family_ops = {
 	.family = PF_INET6,
 	.create = inet6_create,
@@ -528,7 +549,7 @@
 	.type		= SOCK_RAW,
 	.protocol	= IPPROTO_IP,	/* wild card */
 	.prot		= &rawv6_prot,
-	.ops		= &inet6_dgram_ops,
+	.ops		= &inet6_raw_ops,
 	.capability	= CAP_NET_RAW,
 	.no_check	= UDP_CSUM_DEFAULT,
 	.flags		= INET_PROTOSW_REUSE,

  reply	other threads:[~2004-12-07 18:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-07  0:35 Recent select() handling change breaks Poptop Phil Oester
2004-12-07  2:52 ` Mitchell Blank Jr
2004-12-07  4:53   ` Phil Oester
2004-12-07  5:48     ` Mitchell Blank Jr
2004-12-07 15:08       ` [PATCH] fix select() for SOCK_RAW sockets Mitchell Blank Jr
2004-12-07 17:28         ` Phil Oester
2004-12-07 17:35         ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-07 18:01           ` Stephen Hemminger [this message]
2004-12-07 18:48             ` [PATCH] fix select() for SOCK_RAW sockets (ipv6) David S. Miller
2004-12-07 18:56               ` Stephen Hemminger
2004-12-08  7:58               ` YOSHIFUJI Hideaki / 吉藤英明
2004-12-07 17:45         ` [PATCH] fix select() for SOCK_RAW sockets Stephen Hemminger
2004-12-08  5:28         ` David S. Miller

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=20041207100140.781f4c00@dxpl.pdx.osdl.net \
    --to=shemminger@osdl.org \
    --cc=davem@davemloft.net \
    --cc=kernel@linuxace.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=mitch@sfgoth.com \
    --cc=netdev@oss.sgi.com \
    --cc=yoshfuji@linux-ipv6.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®