I'm trying to understand the details of SO_REUSEADDR behaviour. I think
I've found some inconsistencies in how bind conflicts are handled.
In particular, TCP and UDP behaviour seems to differ.
Let’s start with simplest TCP cases.
Case 1:
* Socket A: bound to 0.0.0.0 tcp/1234; SO_REUSEADDR absent
me prefix.
Any questions/feedback appreciated.
Thanks,
Gilberto
Gilberto Bertin (4):
bindtoprefix: infrastructure
bindtoprefix: TCP/IPv4 implementation
bindtoprefix: TCP/IPv6 implementation
bindtoprefix: UPD implementation
include/net/sock.h| 20 +++
include/uapi/a
Signed-off-by: Gilberto Bertin
---
net/ipv6/inet6_connection_sock.c | 17 -
net/ipv6/inet6_hashtables.c | 6 ++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 36c3f01..c65023f
Signed-off-by: Gilberto Bertin
---
net/ipv4/udp.c | 36
1 file changed, 36 insertions(+)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 95d2f19..31b9687 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -133,6 +133,23 @@ EXPORT_SYMBOL
Signed-off-by: Gilberto Bertin
---
include/net/sock.h| 20 +++
include/uapi/asm-generic/socket.h | 1 +
net/core/sock.c | 111 ++
3 files changed, 132 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h
Signed-off-by: Gilberto Bertin
---
net/ipv4/inet_connection_sock.c | 20 +++-
net/ipv4/inet_hashtables.c | 9 +
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 6414891..162c252
Signed-off-by: Gilberto Bertin
---
net/ipv4/inet_connection_sock.c | 20 +++-
net/ipv4/inet_hashtables.c | 9 +
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 6414891..0a3777c
ses masked with the shortest of their
prefix are equal.
The bindtosubnet option can be combined with soreuseport so that two
listener can bind on the same subnet.
Any questions/feedback appreciated.
Thanks,
Gilberto
Gilberto Bertin (4):
bindtosubnet: infrastructure
bindtosubnet: TCP/IPv4
Signed-off-by: Gilberto Bertin
---
net/ipv6/inet6_connection_sock.c | 17 -
net/ipv6/inet6_hashtables.c | 6 ++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 36c3f01..288bab6
Signed-off-by: Gilberto Bertin
---
include/net/sock.h| 20 +++
include/uapi/asm-generic/socket.h | 1 +
net/core/sock.c | 111 ++
3 files changed, 132 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h
Signed-off-by: Gilberto Bertin
---
net/ipv4/udp.c | 36
1 file changed, 36 insertions(+)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 95d2f19..1ecffa8 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -133,6 +133,23 @@ EXPORT_SYMBOL
> On 7 Mar 2016, at 17:49, Tom Herbert wrote:
>
>> That said, do you believe it could be an option to maybe have both these
>> options? I think that the ability to run BPF in the listening path is
>> really interesting, but it's probably an overkill for the bind-to-subnet
>> use case.
>>
>
> M
> On 24 Feb 2016, at 05:06, Tom Herbert wrote:
>
> On Tue, Feb 23, 2016 at 7:27 AM, Gilberto Bertin
> wrote:
>> This series introduces support for the SO_BINDTOSUBNET socket option, which
>> allows a listener socket to bind to a subnet instead of * or a single
>&
> On 24 Feb 2016, at 05:06, Tom Herbert wrote:
>
> On Tue, Feb 23, 2016 at 7:27 AM, Gilberto Bertin
> wrote:
>> This series introduces support for the SO_BINDTOSUBNET socket option, which
>> allows a listener socket to bind to a subnet instead of * or a single
>&
Signed-off-by: Gilberto Bertin
---
net/ipv4/udp.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index c438908..0e78fc4 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -132,6 +132,22 @@ EXPORT_SYMBOL
Signed-off-by: Gilberto Bertin
---
include/net/sock.h| 20 +++
include/uapi/asm-generic/socket.h | 1 +
net/core/sock.c | 111 ++
3 files changed, 132 insertions(+)
diff --git a/include/net/sock.h b/include/net/sock.h
Signed-off-by: Gilberto Bertin
---
net/ipv6/inet6_connection_sock.c | 17 -
net/ipv6/inet6_hashtables.c | 6 ++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index a7ca2cd..b781a13
equal.
The bindtosubnet option can be combined with soreuseport so that two
listener can bind on the same subnet.
Any questions/feedback appreciated.
Thanks,
Gilberto
Gilberto Bertin (4):
bindtosubnet: infrastructure
bindtosubnet: TCP/IPv4 implementation
bindtosubnet: TCP/IPv6 impl
Signed-off-by: Gilberto Bertin
---
net/ipv4/inet_connection_sock.c | 20 +++-
net/ipv4/inet_hashtables.c | 9 +
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 46b9c88..b182ec6
> On 29 Oct 2015, at 17:44, Maciej Żenczykowski wrote:
>
> What are you trying to do?
I would like to have a "bind-to-subnet" semantic with IPv6.
This is currently working with IPv4, and the setup is the follow:
- setup a dummy network device configured with any-IP
- add an any-IP route
- bin
> On 29 Oct 2015, at 18:39, Hannes Frederic Sowa
> wrote:
>
> Try the loopback interface:
>
> ip -6 route add local abcd:abcd:abcd:abcd::/64 dev *lo*
>
> Otherwise packets should end up in neighbor subsystem and you don't want
> that, still. ;)
>
Thanks for the reply.
I know it’s working o
Hello,
testing Any-IP on my machine, I noticed that it's not working with IPv6
addresses.
Tests are performed on a 4.1 kernel.
Steps to reproduce the bug:
1- make sure Any-IP is working with IPv4 addresses:
# ip -4 route add local 4.4.4.0/24 dev eth0
with this command every packets with an IP i
22 matches
Mail list logo