mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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>
This commit is contained in:
parent
f3a7c7678a
commit
7bbec4d871
@ -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++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user