Skip to content
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

CIDR 0.0.0.0/0 should accept all connections, but it won't #2767

Closed
amarchanka opened this issue Aug 14, 2014 · 1 comment
Closed

CIDR 0.0.0.0/0 should accept all connections, but it won't #2767

amarchanka opened this issue Aug 14, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@amarchanka
Copy link

org.jboss.netty.handler.ipfilter.CIDR4 has mistake in logic, for CIDR 0.0.0.0/0 it creates addressInt = 0 and addressEndInt = 0.
Filter with such mask deny any ip address.
Netty 3.9.2.Final

@trustin trustin added this to the 3.9.4.Final milestone Aug 15, 2014
@trustin trustin added the defect label Aug 15, 2014
buchgr added a commit to buchgr/netty that referenced this issue Aug 16, 2014
Motivation:

In GitHub issue netty#2767 a bug was reported that the IPv4
default route leads to the ipfilter package denying
instead of accepting all addresses.

While the issue was reported for Netty 3.9, this bug
also applies to Netty 4 and higher.

Modifications:

When computing the subnet address from the CIDR prefix,
correctly handle the case where the prefix is set to zero.

Result:

Ipfilter accepts all addresses when passed the
IPv4 default route.
normanmaurer pushed a commit that referenced this issue Aug 17, 2014
Motivation:

In GitHub issue #2767 a bug was reported that the IPv4
default route leads to the ipfilter package denying
instead of accepting all addresses.

While the issue was reported for Netty 3.9, this bug
also applies to Netty 4 and higher.

Modifications:

When computing the subnet address from the CIDR prefix,
correctly handle the case where the prefix is set to zero.

Result:

Ipfilter accepts all addresses when passed the
IPv4 default route.
normanmaurer pushed a commit that referenced this issue Aug 17, 2014
Motivation:

In GitHub issue #2767 a bug was reported that the IPv4
default route leads to the ipfilter package denying
instead of accepting all addresses.

While the issue was reported for Netty 3.9, this bug
also applies to Netty 4 and higher.

Modifications:

When computing the subnet address from the CIDR prefix,
correctly handle the case where the prefix is set to zero.

Result:

Ipfilter accepts all addresses when passed the
IPv4 default route.
trustin added a commit that referenced this issue Aug 26, 2014
Related issue: #2767

Motivation:

CIDR.contains(InetAddress) implementations should always return true
when the CIDR's prefix length is 0.

Modifications:

- Make CIDR.contains(InetAddress) return true if the current cidrMask is
  0
- Add tests

Result:

Fixed the issue #2767
@trustin trustin self-assigned this Aug 26, 2014
@trustin
Copy link
Member

trustin commented Aug 26, 2014

Fixed in 534840a

@trustin trustin closed this as completed Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants