summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorBjörn Jacke <bjacke@samba.org>2017-12-12 22:32:09 +0100
committerAndrew Bartlett <abartlet@samba.org>2017-12-13 20:34:23 +0100
commit7bbec4d8714849a64b62e56e8fec390f4613e00d (patch)
tree8b8a53380a6ebc79b78cc11318be991b3ccde6f5 /source4/lib
parentf3a7c7678afe71ef0770839ed92054f82e2301bb (diff)
downloadsamba-7bbec4d8714849a64b62e56e8fec390f4613e00d.tar.gz
s4: remove ipv6:enabled parameteric option
this was never disabling ipv6, only v6-only interfaces. This can be achieved with the interfaces parameter also if wanted. Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/interface.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index 963c0aac3dc..594df1a0526 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -75,8 +75,7 @@ static struct interface *iface_list_find(struct interface *interfaces,
/****************************************************************************
add an interface to the linked list of interfaces
****************************************************************************/
-static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, struct interface **interfaces,
- bool enable_ipv6)
+static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, struct interface **interfaces)
{
char addr[INET6_ADDRSTRLEN];
struct interface *iface;
@@ -94,10 +93,6 @@ static void add_interface(TALLOC_CTX *mem_ctx, const struct iface_struct *ifs, s
return;
}
- if (!enable_ipv6 && ifs->ip.ss_family != AF_INET) {
- return;
- }
-
iface = talloc(*interfaces == NULL ? mem_ctx : *interfaces, struct interface);
if (iface == NULL)
return;
@@ -153,8 +148,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
const char *token,
struct iface_struct *probed_ifaces,
int total_probed,
- struct interface **local_interfaces,
- bool enable_ipv6)
+ struct interface **local_interfaces)
{
struct sockaddr_storage ss;
struct sockaddr_storage ss_mask;
@@ -170,7 +164,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
for (i=0;i<total_probed;i++) {
if (gen_fnmatch(token, probed_ifaces[i].name) == 0) {
add_interface(mem_ctx, &probed_ifaces[i],
- local_interfaces, enable_ipv6);
+ local_interfaces);
added = true;
}
}
@@ -199,7 +193,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
for (i=0;i<total_probed;i++) {
if (sockaddr_equal((struct sockaddr *)&ss, (struct sockaddr *)&probed_ifaces[i].ip)) {
add_interface(mem_ctx, &probed_ifaces[i],
- local_interfaces, enable_ipv6);
+ local_interfaces);
return;
}
}
@@ -269,7 +263,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
p,
probed_ifaces[i].name));
add_interface(mem_ctx, &probed_ifaces[i],
- local_interfaces, enable_ipv6);
+ local_interfaces);
probed_ifaces[i].netmask = saved_mask;
return;
}
@@ -291,8 +285,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
ifs.ip = ss;
ifs.netmask = ss_mask;
ifs.bcast = ss_bcast;
- add_interface(mem_ctx, &ifs,
- local_interfaces, enable_ipv6);
+ add_interface(mem_ctx, &ifs, local_interfaces);
}
@@ -305,7 +298,6 @@ void load_interface_list(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, s
int i;
struct iface_struct *ifaces = NULL;
int total_probed;
- bool enable_ipv6 = lpcfg_parm_bool(lp_ctx, NULL, "ipv6", "enable", true);
*local_interfaces = NULL;
@@ -320,13 +312,13 @@ void load_interface_list(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, s
}
for (i=0;i<total_probed;i++) {
if (!is_loopback_addr((struct sockaddr *)&ifaces[i].ip)) {
- add_interface(mem_ctx, &ifaces[i], local_interfaces, enable_ipv6);
+ add_interface(mem_ctx, &ifaces[i], local_interfaces);
}
}
}
while (ptr && *ptr) {
- interpret_interface(mem_ctx, *ptr, ifaces, total_probed, local_interfaces, enable_ipv6);
+ interpret_interface(mem_ctx, *ptr, ifaces, total_probed, local_interfaces);
ptr++;
}