summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/interface.c12
-rw-r--r--source3/lib/util_sock.c10
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index f533ec92c7..48fa4d32a9 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -33,7 +33,7 @@ bool ismyaddr(const struct sockaddr *ip)
{
struct interface *i;
for (i=local_interfaces;i;i=i->next) {
- if (addr_equal((struct sockaddr *)&i->ip,ip)) {
+ if (sockaddr_equal((struct sockaddr *)&i->ip,ip)) {
return true;
}
}
@@ -65,7 +65,7 @@ static struct interface *iface_find(const struct sockaddr *ip,
if (same_net(ip, (struct sockaddr *)&i->ip, (struct sockaddr *)&i->netmask)) {
return i;
}
- } else if (addr_equal((struct sockaddr *)&i->ip, ip)) {
+ } else if (sockaddr_equal((struct sockaddr *)&i->ip, ip)) {
return i;
}
}
@@ -93,7 +93,7 @@ void setup_linklocal_scope_id(struct sockaddr *pss)
{
struct interface *i;
for (i=local_interfaces;i;i=i->next) {
- if (addr_equal((struct sockaddr *)&i->ip,pss)) {
+ if (sockaddr_equal((struct sockaddr *)&i->ip,pss)) {
struct sockaddr_in6 *psa6 =
(struct sockaddr_in6 *)pss;
psa6->sin6_scope_id = if_nametoindex(i->name);
@@ -388,7 +388,7 @@ static void interpret_interface(char *token)
}
for (i=0;i<total_probed;i++) {
- if (addr_equal((struct sockaddr *)&ss, (struct sockaddr *)&probed_ifaces[i].ip)) {
+ if (sockaddr_equal((struct sockaddr *)&ss, (struct sockaddr *)&probed_ifaces[i].ip)) {
add_interface(&probed_ifaces[i]);
return;
}
@@ -441,8 +441,8 @@ static void interpret_interface(char *token)
make_net(&ss_net, &ss, &ss_mask);
/* Maybe the first component was a broadcast address. */
- if (addr_equal((struct sockaddr *)&ss_bcast, (struct sockaddr *)&ss) ||
- addr_equal((struct sockaddr *)&ss_net, (struct sockaddr *)&ss)) {
+ if (sockaddr_equal((struct sockaddr *)&ss_bcast, (struct sockaddr *)&ss) ||
+ sockaddr_equal((struct sockaddr *)&ss_net, (struct sockaddr *)&ss)) {
for (i=0;i<total_probed;i++) {
if (same_net((struct sockaddr *)&ss,
(struct sockaddr *)&probed_ifaces[i].ip,
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 5721f412d6..605bbf1fb6 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -52,7 +52,7 @@ bool interpret_string_addr(struct sockaddr_storage *pss,
}
#endif
- zero_addr(pss);
+ zero_sockaddr(pss);
if (!interpret_string_addr_internal(&res, str, flags|AI_ADDRCONFIG)) {
return false;
@@ -81,7 +81,7 @@ bool interpret_string_addr(struct sockaddr_storage *pss,
Set an address to INADDR_ANY.
******************************************************************/
-void zero_addr(struct sockaddr_storage *pss)
+void zero_sockaddr(struct sockaddr_storage *pss)
{
memset(pss, '\0', sizeof(*pss));
/* Ensure we're at least a valid sockaddr-storage. */
@@ -1254,7 +1254,7 @@ static bool matchname(const char *remotehost,
if (!res->ai_addr) {
continue;
}
- if (addr_equal((const struct sockaddr *)res->ai_addr,
+ if (sockaddr_equal((const struct sockaddr *)res->ai_addr,
(struct sockaddr *)pss)) {
freeaddrinfo(ailist);
return true;
@@ -1367,7 +1367,7 @@ const char *get_peer_name(int fd, bool force_lookup)
p = get_peer_addr_internal(fd, addr_buf, sizeof(addr_buf), (struct sockaddr *)&ss, &length);
/* it might be the same as the last one - save some DNS work */
- if (addr_equal((struct sockaddr *)&ss, (struct sockaddr *)&nc.ss)) {
+ if (sockaddr_equal((struct sockaddr *)&ss, (struct sockaddr *)&nc.ss)) {
return nc.name ? nc.name : "UNKNOWN";
}
@@ -1687,7 +1687,7 @@ bool is_myname_or_ipaddr(const char *s)
}
n = get_interfaces(nics, MAX_INTERFACES);
for (i=0; i<n; i++) {
- if (addr_equal((struct sockaddr *)&nics[i].ip, (struct sockaddr *)&ss)) {
+ if (sockaddr_equal((struct sockaddr *)&nics[i].ip, (struct sockaddr *)&ss)) {
TALLOC_FREE(nics);
return true;
}