bugzilla-daemon@netfilter.org
2003-Jun-21 15:43 UTC
[Bug 103] New: ip6tables -L does not separate address and mask if mask is odd
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=103 Summary: ip6tables -L does not separate address and mask if mask is odd Product: iptables userspace Version: 1.2.8 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P2 Component: ip6tables AssignedTo: laforge@netfilter.org ReportedBy: mikko.markus.torni@iki.fi CC: netfilter-buglog@lists.netfilter.org ip6tables -L does not separate address and mask if mask is odd Example output: Chain FORWARD (policy ACCEPT) target prot opt source destination DROP all ffc0::ffc0:: anywhere Here's a patch that fixes it: --- iptables-1.2.8/ip6tables.c 2003-06-21 18:19:30.000000000 +0300 +++ iptables-1.2.8-new/ip6tables.c 2003-06-21 18:37:42.000000000 +0300 @@ -578,10 +578,13 @@ static char * mask_to_numeric(const struct in6_addr *addrp) { - static char buf[20]; + static char buf[50+2]; int l = ipv6_prefix_length(addrp); - if (l == -1) - return addr_to_numeric(addrp); + if (l == -1) { + strcpy(buf, "/"); + strcat(buf, addr_to_numeric(addrp)); + return buf; + } sprintf(buf, "/%d", l); return buf; } ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
Reasonably Related Threads
- [ANNOUNCE] Release of iptables-1.2.9
- [ANNOUNCE] Release of iptables-1.2.9rc1
- [Bug 102] New: ipv6_prefix_length works only on LITTLE_ENDIAN and prefix_length % 8 == 0
- [Bug 1186] New: ip6tables-restore not passing useful error messages from ip6tables
- ip6tables on C7