[ZBX-8608] Zabbix server does not recognize CIDR (slash) notation in Network Discovery Created: 2014 Aug 12 Updated: 2017 May 30 Resolved: 2014 Aug 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.20, 2.0.12, 2.2.5, 2.3.3 |
Fix Version/s: | 1.8.21rc1, 2.0.13rc1, 2.2.6rc1, 2.3.4 |
Type: | Incident report | Priority: | Trivial |
Reporter: | dimir | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | netmask, networkdiscovery | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
Zabbix server won't recognize the "IP range" in CIDR (slash) notation in action conditions and when deleting lost discovery services. The ip_in_list() function is missing functionality to parse those. |
Comments |
Comment by Alexander Vladishev [ 2014 Aug 14 ] |
(1) Documentation should be corrected. Valid mask for IPv4 addresses should be /16 - /30
sasha ReSOLVED <dimir> CLOSED |
Comment by Alexander Vladishev [ 2014 Aug 14 ] |
That was made
|
Comment by Alexander Vladishev [ 2014 Aug 14 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-8608 |
Comment by dimir [ 2014 Aug 14 ] |
(2) [S] Suggestion to rename in trunk: ip_in_list(char *list, const char *ip) -> ip_in_range(char *range, const char *ip) ip4_in_list(char *list, const char *ip) -> ip4_in_range(char *range, const char *ip) ip6_in_list(char *list, const char *ip) -> ip6_in_range(char *range, const char *ip) sasha The first argument is the list of ranges. I think we shouldn't rename the function or rename to ip*_in_ranges(char *ranges, const char *ip). CLOSED |
Comment by dimir [ 2014 Aug 14 ] |
Next thing noted regarding the range of IPv6 addresses when CIDR format used in Network Discovery rule. E. g. when using range 12fc::28/126 before the fix, resulted in 2 IPs: 12fc::29-12fc::2a after the fix (correct behavior), 4 IPs: 12fc::28-12fc::2b |
Comment by dimir [ 2014 Aug 15 ] |
(3) [S] The function ip6_str2dig() won't accept (seems to be) valid IPv6 address: ::0:0:0:0:0:0:1 and will accept (seems to be) invalid IPv6 address: :: asaveljevs Just a quick note: netstat gives "::" as the listening IP address, which probably is analogous to "0.0.0.0" in IPv4 and means all addresses: $ netstat -tnl | grep :: tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 ::1:25 :::* LISTEN tcp6 0 0 :::443 :::* LISTEN :: - this is valid address
::0:0:0:0:0:0:1 - this address is invalid
RESOLVED <dimir> Thanks for clearing this out! CLOSED |
Comment by dimir [ 2014 Aug 18 ] |
Successfully tested. Please review my small changes in r48154. |
Comment by Alexander Vladishev [ 2014 Aug 18 ] |
Fixed in pre-1.8.21 r48155, pre-2.0.13 r48156, pre-2.2.6 r48157 and pre-2.3.4 (trunk) r48158. |