diff options
author | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-10-29 11:03:47 +0800 |
---|---|---|
committer | Zhang zhengguang <zhengguang.zhang@intel.com> | 2014-10-29 11:03:47 +0800 |
commit | bcae74da8fa2958b3fec9153fc33e41f0e0317bf (patch) | |
tree | 06a00f6457307467fee4f6580dce4a1a857751c1 /src/tethering.c | |
parent | 1b9d0a62f59bb48c8deb2f0b98d9acdffdd9abe7 (diff) | |
download | connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.gz connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.tar.bz2 connman-bcae74da8fa2958b3fec9153fc33e41f0e0317bf.zip |
Imported Upstream version 1.26upstream/1.26
Diffstat (limited to 'src/tethering.c')
-rw-r--r-- | src/tethering.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tethering.c b/src/tethering.c index c7e17f5d..ceeec746 100644 --- a/src/tethering.c +++ b/src/tethering.c @@ -222,7 +222,7 @@ void __connman_tethering_set_enabled(void) end_ip = __connman_ippool_get_end_ip(dhcp_ippool); err = __connman_bridge_enable(BRIDGE_NAME, gateway, - __connman_ipaddress_netmask_prefix_len(subnet_mask), + connman_ipaddress_calc_netmask_len(subnet_mask), broadcast); if (err < 0 && err != -EALREADY) { __connman_ippool_unref(dhcp_ippool); @@ -267,7 +267,7 @@ void __connman_tethering_set_enabled(void) return; } - prefixlen = __connman_ipaddress_netmask_prefix_len(subnet_mask); + prefixlen = connman_ipaddress_calc_netmask_len(subnet_mask); err = __connman_nat_enable(BRIDGE_NAME, start_ip, prefixlen); if (err < 0) { connman_error("Cannot enable NAT %d/%s", err, strerror(-err)); @@ -340,8 +340,7 @@ static void setup_tun_interface(unsigned int flags, unsigned change, subnet_mask = __connman_ippool_get_subnet_mask(pn->pool); server_ip = __connman_ippool_get_start_ip(pn->pool); peer_ip = __connman_ippool_get_end_ip(pn->pool); - prefixlen = - __connman_ipaddress_netmask_prefix_len(subnet_mask); + prefixlen = connman_ipaddress_calc_netmask_len(subnet_mask); if ((__connman_inet_modify_address(RTM_NEWADDR, NLM_F_REPLACE | NLM_F_ACK, pn->index, AF_INET, |