diff options
author | Thomas Haller <thaller@redhat.com> | 2020-07-28 09:16:37 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-07-31 08:53:05 +0200 |
commit | d61bb9b97c7c4e3d0ad6e9867016446ea785f247 (patch) | |
tree | 6922967f6369bc0c42da68741c960bacb4df96b4 /src | |
parent | 7670899d2c73b8072996e57282cfbf119b3e6022 (diff) |
core: use nm_utils_ip4_address_is_zeronet() helper
Diffstat (limited to 'src')
-rw-r--r-- | src/nm-ip4-config.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c index 4a9026cdb3..9e080fa405 100644 --- a/src/nm-ip4-config.c +++ b/src/nm-ip4-config.c @@ -343,15 +343,6 @@ nm_ip4_config_get_multi_idx (const NMIP4Config *self) /*****************************************************************************/ -static gboolean -_ipv4_is_zeronet (in_addr_t network) -{ - /* Same as ipv4_is_zeronet() from kernel's include/linux/in.h. */ - return (network & htonl(0xff000000)) == htonl(0x00000000); -} - -/*****************************************************************************/ - const NMDedupMultiHeadEntry * nm_ip4_config_lookup_addresses (const NMIP4Config *self) { @@ -686,7 +677,7 @@ nm_ip4_config_add_dependent_routes (NMIP4Config *self, _add_local_route_from_addr4 (self, my_addr, ifindex, route_table, is_vrf); - if (_ipv4_is_zeronet (network)) { + if (nm_utils_ip4_address_is_zeronet (network)) { /* Kernel doesn't add device-routes for destinations that * start with 0.x.y.z. Skip them. */ continue; |