summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2013-06-03 02:15:31 -0700
committerDaniil Baturin <daniil@baturin.org>2013-06-03 02:15:31 -0700
commite0d117042121863ef2dab887d691be955842c222 (patch)
tree7528d48a10986a7031309a1a9d4de6c36a2f87f0
parent92bc23a0c6a51660e693a37f5ad6a836122c4105 (diff)
downloadipaddrcheck-e0d117042121863ef2dab887d691be955842c222.tar.gz
ipaddrcheck-e0d117042121863ef2dab887d691be955842c222.zip
Fix is_valid_intf_address() behaviour, don't allow network addresses
as valid interface addresses.
-rw-r--r--src/ipaddrcheck_functions.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ipaddrcheck_functions.c b/src/ipaddrcheck_functions.c
index 59b30a4..a9e1384 100644
--- a/src/ipaddrcheck_functions.c
+++ b/src/ipaddrcheck_functions.c
@@ -456,6 +456,7 @@ int is_valid_intf_address(CIDR *address, char* address_str, int allow_loopback)
(cidr_equals(address, cidr_from_str(IPV4_UNSPECIFIED)) != 0) &&
(cidr_contains(cidr_from_str(IPV4_THIS), address) != 0) &&
(cidr_equals(address, cidr_from_str(IPV4_LIMITED_BROADCAST)) != 0) &&
+ (is_any_host(address) == RESULT_SUCCESS) &&
(is_any_cidr(address_str) == RESULT_SUCCESS) )
{
result = RESULT_SUCCESS;