Bug 1297092
Summary: | ipset and iptables extension set: support 0.0.0.0/0 for data type net or reject it (specifically hash:net,iface) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | an0nym |
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 23 | CC: | an0nym, crosscutrat, gansalmon, itamar, jonathan, jpopelka, kernel-maint, kwizart, madhu.chinakonda, mchehab, twoerner |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-10-26 16:48:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
an0nym
2016-01-09 01:21:18 UTC
This seems to be an issue in ipset: It is not possible to add 0.0.0.0/0 to hash:net, but it is possible to add 0.0.0.0/0,eth0 to hash:net,iface. The test for the address if it is combined with another parameter seems not to be correct. Reassigning to ipset Thomas, however issuing ipset test from terminal manages to do the test right. I imply iptables test implementation differs from the one in ipset test. And currently ipset test implementation is consistent with its manual and behaviour (it allows adding 0.0.0.0/0 to hash:net,iface thus should be able to test it). I. e. at the moment formally iptables is in the wrong. Apart from that I agree with you that since other hash:net* types do not allow 0.0.0.0/0 to be added, hash:net,iface was meant to not allow as well. Nevertheless I'd prefer all of them to support adding 0.0.0.0/0 and iptables to work properly in this case instead of restricting this value - simply because there are use cases for 0.0.0.0/0. iptables is not handling 0.0.0.0/0, it is just removing it. Please have a look at the resulting rule if you are adding this rule: "iptables -A INPUT -s 0.0.0.0/0 -j ACCEPT" It results in "iptables -A INPUT -j ACCEPT". iptables is simply removing or ignoring a source or destination of 0.0.0.0/0. {-s,-d} 0.0.0.0/0 could only be treated as not being set. I am not sure that this use case is supported by ipsets. Thomas, what you've demonstrated is true. However I see one major point. Removing {-s,-d} 0.0.0.0/0 does not change the result of the rule execution, there are no side effects from this, i. e. it could be treated as just an optimization. Not honoring 0.0.0.0/0 in case of set match extension, on the other hand, does change the result and have side effects. P. S. Changing the result is quite obvious. By side effects I mean e. g. ipset counters increment. Assigning to kernel. Here is the netfilter upstream patch: http://git.netfilter.org/ipset/commit/?id=9b0be3d2545bfd0b482883bada1f4f0410b683ef *********** MASS BUG UPDATE ************** We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 23 kernel bugs. Fedora 23 has now been rebased to 4.7.4-100.fc23. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 24 or 25, and are still experiencing this issue, please change the version to Fedora 24 or 25. If you experience different issues, please open a new bug report for those. *********** MASS BUG UPDATE ************** This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 4 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously. This bug still appears to be an issue with 4.15: # ipset create test hash:net # ipset add test 0.0.0.0/0 ipset v6.23: The value of the CIDR parameter of the IP address is invalid # uname -a Linux hostname 4.15.1 #2 SMP PREEMPT Fri Mar 23 22:43:27 UTC 2018 x86_64 GNU/Linux |