New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow IP_FREEBIND option for UDP epoll #8727

Closed
yulianoifa-mobius opened this Issue Jan 17, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@yulianoifa-mobius
Copy link
Contributor

yulianoifa-mobius commented Jan 17, 2019

Expected behavior

while adding IP_FREEBIND option to boostrap it should work with EpollDatagramChannel

Actual behavior

notification is logged that IP_FREEBIND is unknown option for this type of channel

Steps to reproduce

set EpollChannelOption.IP_FREEBIND to true on ConnectionlessBootstrap

Minimal yet complete reproducer code (or URL to code)

group = new EpollEventLoopGroup(poolSize);
connectionlessBootstrap=new Bootstrap();
connectionlessBootstrap.option(EpollChannelOption.SO_REUSEPORT, true);
connectionlessBootstrap.option(EpollChannelOption.IP_RECVORIGDSTADDR, true);
connectionlessBootstrap.option(EpollChannelOption.IP_FREEBIND, true);
connectionlessBootstrap.channel(EpollDatagramChannel.class);
connectionlessBootstrap.group(group);
connectionlessBootstrap.bind(new InetSocketAddress("0.0.0.0", port));

Netty version

4.1.25

JVM version (e.g. java -version)

1.8.0

OS version (e.g. uname -a)

ubuntu

normanmaurer added a commit that referenced this issue Jan 17, 2019

Support IP_FREEBIND when using EpollDatagramChannel
Motivation:

We missed to support IP_FREEBIND in EpollDatagramChannel while it should just work.

Modifications:

Add support and add unit test.

Result:

Fixes #8727.

@normanmaurer normanmaurer added this to the 4.1.33.Final milestone Jan 18, 2019

@normanmaurer normanmaurer self-assigned this Jan 18, 2019

@normanmaurer normanmaurer added the defect label Jan 18, 2019

normanmaurer added a commit that referenced this issue Jan 21, 2019

Allowed IP_FREEBIND option for UDP epoll (#8728)
Motivation:

While using Load Balancers or HA support is needed there are cases when UDP channel need to bind to IP Address which is not available on network interfaces locally.

Modification:

Modified EpollDatagramChannelConfig to allow IP_FREEBIND option

Result:

Fixes ##8727.

normanmaurer added a commit that referenced this issue Jan 21, 2019

Allowed IP_FREEBIND option for UDP epoll (#8728)
Motivation:

While using Load Balancers or HA support is needed there are cases when UDP channel need to bind to IP Address which is not available on network interfaces locally.

Modification:

Modified EpollDatagramChannelConfig to allow IP_FREEBIND option

Result:

Fixes ##8727.
@normanmaurer

This comment has been minimized.

Copy link
Member

normanmaurer commented Jan 21, 2019

@yulianoifa-mobius thanks a lot for the patch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment