netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
To: NETDEV <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: [PATCH net-next v2] IPv6: enable bind() to assign an anycast address
Date: Wed, 12 Feb 2014 14:38:51 +0100	[thread overview]
Message-ID: <1392212332-10463-1-git-send-email-fx.lebail@yahoo.com> (raw)

- Use ipv6_chk_acast_addr_src() in inet6_bind().

Signed-off-by: Francois-Xavier Le Bail <fx.lebail@yahoo.com>
---
v2: ipv6_chk_acast_addr_src() was previously added.

 net/ipv6/af_inet6.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index c921d5d..68b81e9 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -347,7 +347,9 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 			if (!(addr_type & IPV6_ADDR_MULTICAST))	{
 				if (!(inet->freebind || inet->transparent) &&
 				    !ipv6_chk_addr(net, &addr->sin6_addr,
-						   dev, 0)) {
+						   dev, 0) &&
+				    !ipv6_chk_acast_addr_src(net, dev,
+							     &addr->sin6_addr)) {
 					err = -EADDRNOTAVAIL;
 					goto out_unlock;
 				}

             reply	other threads:[~2014-02-12 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12 13:38 Francois-Xavier Le Bail [this message]
2014-02-13  0:16 ` [PATCH net-next v2] IPv6: enable bind() to assign an anycast address Hannes Frederic Sowa
2014-02-17  5:15   ` David Miller
2014-02-17  9:32     ` Christoph Paasch
2014-02-17 10:02       ` Alexey Kuznetsov
2014-02-17 19:19         ` David Miller
2014-02-17 19:25           ` Hannes Frederic Sowa
2014-02-17 19:42           ` François-Xavier Le Bail
2014-02-17 19:48             ` David Miller
2014-02-17 19:52               ` François-Xavier Le Bail
  -- strict thread matches above, loose matches on Subject: below --
2014-01-13 16:59 Francois-Xavier Le Bail

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=1392212332-10463-1-git-send-email-fx.lebail@yahoo.com \
    --to=fx.lebail@yahoo.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).