All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy King <acking@vmware.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Cc: davem@davemloft.net, pv-drivers@vmware.com, kraxel@redhat.com,
	Andy King <acking@vmware.com>
Subject: [PATCH 4/4] VSOCK: Don't reject PF_VSOCK protocol
Date: Mon, 18 Feb 2013 08:04:13 -0800	[thread overview]
Message-ID: <1361203453-1347-5-git-send-email-acking@vmware.com> (raw)
In-Reply-To: <1361203453-1347-1-git-send-email-acking@vmware.com>

Allow our own family as the protocol value for socket creation.

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Andy King <acking@vmware.com>
---
 net/vmw_vsock/af_vsock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index c1b9e55..ca511c4 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1860,7 +1860,7 @@ static int vsock_create(struct net *net, struct socket *sock,
 	if (!sock)
 		return -EINVAL;
 
-	if (protocol)
+	if (protocol && protocol != PF_VSOCK)
 		return -EPROTONOSUPPORT;
 
 	switch (sock->type) {
-- 
1.7.4.1


WARNING: multiple messages have this Message-ID (diff)
From: Andy King <acking@vmware.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Cc: pv-drivers@vmware.com, Andy King <acking@vmware.com>,
	davem@davemloft.net
Subject: [PATCH 4/4] VSOCK: Don't reject PF_VSOCK protocol
Date: Mon, 18 Feb 2013 08:04:13 -0800	[thread overview]
Message-ID: <1361203453-1347-5-git-send-email-acking@vmware.com> (raw)
In-Reply-To: <1361203453-1347-1-git-send-email-acking@vmware.com>

Allow our own family as the protocol value for socket creation.

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Andy King <acking@vmware.com>
---
 net/vmw_vsock/af_vsock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index c1b9e55..ca511c4 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1860,7 +1860,7 @@ static int vsock_create(struct net *net, struct socket *sock,
 	if (!sock)
 		return -EINVAL;
 
-	if (protocol)
+	if (protocol && protocol != PF_VSOCK)
 		return -EPROTONOSUPPORT;
 
 	switch (sock->type) {
-- 
1.7.4.1

  parent reply	other threads:[~2013-02-18 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 16:04 [PATCH 0/4] Minor vSockets fixes Andy King
2013-02-18 16:04 ` [PATCH 1/4] VSOCK: get rid of EXPORT_SYMTAB Andy King
2013-02-18 16:04   ` Andy King
2013-02-18 16:04 ` [PATCH 2/4] VSOCK: get rid of vsock_version.h Andy King
2013-02-18 16:04   ` Andy King
2013-02-18 16:04 ` [PATCH 3/4] VSOCK: Remove hypervisor-only socket option Andy King
2013-02-18 16:04   ` Andy King
2013-02-18 16:04 ` Andy King [this message]
2013-02-18 16:04   ` [PATCH 4/4] VSOCK: Don't reject PF_VSOCK protocol Andy King
2013-02-18 20:03 ` [PATCH 0/4] Minor vSockets fixes David Miller
2013-02-18 20:03   ` David 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=1361203453-1347-5-git-send-email-acking@vmware.com \
    --to=acking@vmware.com \
    --cc=davem@davemloft.net \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=virtualization@lists.linux-foundation.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.