diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 20:50:59 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-23 20:50:59 +0200 |
commit | 215b84903ed202e69241d9fd9494fdc95e911efc (patch) | |
tree | adb66c63498eb1c3e2e165684a123207c9d5c5d3 /source4 | |
parent | 09065795d6e5c48a8b3b536224552f18d68cfb84 (diff) | |
parent | 7577d9ebf06fcdb630b2cdaab8772a6da9e37b70 (diff) | |
download | samba-215b84903ed202e69241d9fd9494fdc95e911efc.tar.gz |
Merge branch 'master' of git://git.samba.org/samba
Diffstat (limited to 'source4')
-rw-r--r-- | source4/client/smbmount.c | 2 | ||||
-rw-r--r-- | source4/lib/socket/interface.c | 8 | ||||
-rw-r--r-- | source4/lib/tdr/tdr.c | 34 |
3 files changed, 5 insertions, 39 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c index d2e98eb1400..c219a42f3ae 100644 --- a/source4/client/smbmount.c +++ b/source4/client/smbmount.c @@ -800,7 +800,7 @@ static void parse_mount_smb(int argc, char **argv) DEBUGLEVEL = val; } else if(!strcmp(opts, "ip")) { dest_ip = interpret_addr2(opteq+1); - if (is_zero_ip(dest_ip)) { + if (is_zero_ip_v4(dest_ip)) { fprintf(stderr,"Can't resolve address %s\n", opteq+1); exit(1); } diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c index b4e7c2bf320..524aa096554 100644 --- a/source4/lib/socket/interface.c +++ b/source4/lib/socket/interface.c @@ -49,11 +49,11 @@ static struct interface *iface_find(struct interface *interfaces, struct in_addr ip, bool CheckMask) { struct interface *i; - if (is_zero_ip(ip)) return interfaces; + if (is_zero_ip_v4(ip)) return interfaces; for (i=interfaces;i;i=i->next) if (CheckMask) { - if (same_net(i->ip,ip,i->nmask)) return i; + if (same_net_v4(i->ip,ip,i->nmask)) return i; } else if (i->ip.s_addr == ip.s_addr) return i; return NULL; @@ -173,7 +173,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx, if (ip.s_addr == MKBCADDR(ip.s_addr, nmask.s_addr) || ip.s_addr == MKNETADDR(ip.s_addr, nmask.s_addr)) { for (i=0;i<total_probed;i++) { - if (same_net(ip, probed_ifaces[i].ip, nmask)) { + if (same_net_v4(ip, probed_ifaces[i].ip, nmask)) { add_interface(mem_ctx, probed_ifaces[i].ip, nmask, local_interfaces); talloc_free(address); @@ -329,7 +329,7 @@ bool iface_is_local(struct interface *ifaces, const char *dest) */ bool iface_same_net(const char *ip1, const char *ip2, const char *netmask) { - return same_net(interpret_addr2(ip1), + return same_net_v4(interpret_addr2(ip1), interpret_addr2(ip2), interpret_addr2(netmask)); } diff --git a/source4/lib/tdr/tdr.c b/source4/lib/tdr/tdr.c index 2ad099174d8..6c5461a335d 100644 --- a/source4/lib/tdr/tdr.c +++ b/source4/lib/tdr/tdr.c @@ -199,40 +199,6 @@ NTSTATUS tdr_print_charset(struct tdr_print *tdr, const char *name, const char * } /** - pull a ipv4address -*/ -NTSTATUS tdr_pull_ipv4address(struct tdr_pull *tdr, TALLOC_CTX *ctx, - const char **address) -{ - struct in_addr in; - TDR_CHECK(tdr_pull_uint32(tdr, ctx, &in.s_addr)); - in.s_addr = htonl(in.s_addr); - *address = talloc_strdup(tdr, inet_ntoa(in)); - NT_STATUS_HAVE_NO_MEMORY(*address); - return NT_STATUS_OK; -} - -/** - push a ipv4address -*/ -NTSTATUS tdr_push_ipv4address(struct tdr_push *tdr, const char **address) -{ - uint32_t addr = htonl(interpret_addr(*address)); - TDR_CHECK(tdr_push_uint32(tdr, &addr)); - return NT_STATUS_OK; -} - -/** - print a ipv4address -*/ -NTSTATUS tdr_print_ipv4address(struct tdr_print *tdr, const char *name, - const char **address) -{ - tdr->print(tdr, "%-25s: %s", name, *address); - return NT_STATUS_OK; -} - -/** parse a hyper */ NTSTATUS tdr_pull_hyper(struct tdr_pull *tdr, TALLOC_CTX *ctx, uint64_t *v) |