Bug 439358 - iptables/netfilter handles CIDR notation incorrectly
iptables/netfilter handles CIDR notation incorrectly
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: iptables (Show other bugs)
5.3
All Linux
low Severity low
: rc
: ---
Assigned To: iptables-maint-list
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-28 04:53 EDT by Jason Roysdon
Modified: 2008-07-15 10:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-15 10:38:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jason Roysdon 2008-03-28 04:53:58 EDT
Description of problem:
iptables handles cidr notation wrong.  This is fixed upstream in netfilter 1.3.6
as bug #422:
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=422

Version-Release number of selected component (if applicable):
1.3.5

How reproducible:
Create the following rule:
-A RH-Firewall-1-INPUT -s 121.254.128/17 -j DROP

  
Actual results:
121.254.0.0/17

Expected results:
121.254.128.0/17

Additional info:
Temp work-around to add all 4 octets first (useful when importing large lists):
awk -F '[/.]' '{mask=$NF;$NF=0; printf "%d.%d.%d.%d/%d\n",$1,$2,$3,$4,mask}'
Comment 1 Thomas Woerner 2008-07-15 10:38:03 EDT
I do not think that it is good to change the behavior here. People might be
using the current scheme and an update will break it.

I am closing this CANTFIX.

Note You need to log in before you can comment on or make changes to this bug.