Skip to contentSkip to conversation

IPv6: enable bind() to assign an anycast address

PATCH In review Francois-Xavier Le Bail 5 participants 10 messages Feb 12, 2014 – Feb 17, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 IPv6: enable bind() to assign an anycast address

- Use ipv6_chk_acast_addr_src() in inet6_bind().

---
v2: ipv6_chk_acast_addr_src() was previously added.

 net/ipv6/af_inet6.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv6/af_inet6.c +3 -1
index c921d5d..68b81e9 100644
@@ -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;
 				}
#1 lore raw

Hi!

[added Cc list from old thread]

Quoted 3 lines · Francois-Xavier Le Bail

- Use ipv6_chk_acast_addr_src() in inet6_bind().

I would agree with the change but would like to see some people from the old thread about this change to agree with it, too.

Quoted 11 lines

---
v2: ipv6_chk_acast_addr_src() was previously added.

 net/ipv6/af_inet6.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv6/af_inet6.c +0 -0
index c921d5d..68b81e9 100644

net/ipv6/af_inet6.c int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) · line 355

Quoted 10 lines
net/ipv6/af_inet6.c +3 -1
@@ -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;
 				}

Thanks,

Hannes

maintainer
#2 lore raw

From: Hannes Frederic Sowa <[email protected]>
Date: Thu, 13 Feb 2014 01:16:24 +0100

Quoted 9 lines

[added Cc list from old thread]

Quoted 3 lines · Francois-Xavier Le Bail

- Use ipv6_chk_acast_addr_src() in inet6_bind().

I would agree with the change but would like to see some people from the old thread about this change to agree with it, too.

I hear crickets... instead of other reviews :-)

#3 lore raw
Quoted 6 lines · David Miller

From: Hannes Frederic Sowa <[email protected]>
Date: Thu, 13 Feb 2014 01:16:24 +0100

Quoted 3 lines

[added Cc list from old thread]

On Wed, Feb 12, 2014 at 02:38:51PM +0100, Francois-Xavier Le Bail wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

- Use ipv6_chk_acast_addr_src() in inet6_bind().

I would agree with the change but would like to see some people from the old thread about this change to agree with it, too.

I hear crickets... instead of other reviews :-)

I don't have strong opinions for or against this patch.

I was only involved in the original thread because F-X claimed that draft-iab-anycast-arch-implications (now RFC 7094) allows the use of anycast addresses for TCP, which is not what RFC 7094 is saying. There is no recommendation concerning TCP in the RFC and the situation is rather unclear.

Cheers,
Christoph

#4 lore raw

Hello!

Quoted 6 lines · Christoph Paasch

I don't have strong opinions for or against this patch.

I was only involved in the original thread because F-X claimed that draft-iab-anycast-arch-implications (now RFC 7094) allows the use of anycast addresses for TCP, which is not what RFC 7094 is saying. There is no recommendation concerning TCP in the RFC and the situation is rather unclear.

The same is here.

Using anycast as source or bind address, why not?

Use of anycast with TCP? Logically impossible, ergo prohibited. If someone wants to play with fire, the option can be left hidden behind a sysctl disabled by default.

maintainer
#5 lore raw

From: Alexey Kuznetsov <[email protected]>
Date: Mon, 17 Feb 2014 14:02:02 +0400

Quoted 11 lines

Hello!

Quoted 6 lines · Christoph Paasch

I don't have strong opinions for or against this patch.

I was only involved in the original thread because F-X claimed that draft-iab-anycast-arch-implications (now RFC 7094) allows the use of anycast addresses for TCP, which is not what RFC 7094 is saying. There is no recommendation concerning TCP in the RFC and the situation is rather unclear.

Quoted 7 lines

The same is here.

Using anycast as source or bind address, why not?

Use of anycast with TCP? Logically impossible, ergo prohibited. If someone wants to play with fire, the option can be left hidden behind a sysctl disabled by default.

Agreed.

#6 lore raw
Quoted 16 lines · David Miller

From: Alexey Kuznetsov <[email protected]>
Date: Mon, 17 Feb 2014 14:02:02 +0400

Quoted 13 lines

Hello!

Quoted 6 lines · Christoph Paasch

I don't have strong opinions for or against this patch.

I was only involved in the original thread because F-X claimed that draft-iab-anycast-arch-implications (now RFC 7094) allows the use of anycast addresses for TCP, which is not what RFC 7094 is saying. There is no recommendation concerning TCP in the RFC and the situation is rather unclear.

The same is here.

Quoted 7 lines
Quoted 5 lines

Using anycast as source or bind address, why not?

Use of anycast with TCP? Logically impossible, ergo prohibited. If someone wants to play with fire, the option can be left hidden behind a sysctl disabled by default.

Agreed.

If a knob seems necessary I would vote for per address flags on those anycast addresses (via setsockopt and netlink) so an application can decide itself if it wants to do so.

Greetings,

Hannes

#7 lore raw
In reply to David Miller
Quoted 16 lines

From: David Miller <[email protected]>

From: Alexey Kuznetsov <[email protected]>

Quoted 6 lines
Quoted 4 lines · Christoph Paasch

I don't have strong opinions for or against this patch.

I was only involved in the original thread because F-X claimed that draft-iab-anycast-arch-implications (now RFC 7094) allows the use of

anycast

Quoted 2 lines
Quoted 2 lines

addresses for TCP, which is not what RFC 7094 is saying. There is no recommendation concerning TCP in the RFC and the situation is rather

unclear.

Quoted 3 lines

The same is here.

Quoted 7 lines
Quoted 5 lines

Using anycast as source or bind address, why not?

Use of anycast with TCP? Logically impossible, ergo prohibited. If someone wants to play with fire, the option can be left hidden behind a sysctl disabled by default.

Agreed.

If I understand well the reviews, no change was ask for this patch. The sysctl was asked in case of patch for TCP.
So, why the status is now "Changes Requested" ?

maintainer
#8 lore raw

From: François-Xavier Le Bail <[email protected]>
Date: Mon, 17 Feb 2014 11:42:45 -0800 (PST)

Quoted 3 lines

If I understand well the reviews, no change was ask for this patch. The sysctl was asked in case of patch for TCP.
So, why the status is now "Changes Requested" ?

This change is in generic bind() code, therefore it allows binding TCP sockets with anycast, therefore you need to make a change.

#9 lore raw

----- Original Message -----

Quoted 8 lines

From: David Miller <[email protected]>
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Sent: Monday, February 17, 2014 8:48 PM
Subject: Re: [PATCH net-next v2] IPv6: enable bind() to assign an anycast address

From: François-Xavier Le Bail <[email protected]>

Quoted 8 lines

Date: Mon, 17 Feb 2014 11:42:45 -0800 (PST)

Quoted 3 lines

If I understand well the reviews, no change was ask for this patch. The sysctl was asked in case of patch for TCP.
So, why the status is now "Changes Requested" ?

This change is in generic bind() code, therefore it allows binding TCP sockets with anycast, therefore you need to make a change.

Understood, thanks.