summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/nmbd/nmbd_subnetdb.c2
-rw-r--r--source3/param/loadparm.c11
3 files changed, 13 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0db536d7b9..95519e318f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3963,6 +3963,7 @@ const char *lp_logon_drive(void);
const char *lp_logon_home(void);
char *lp_remote_announce(void);
char *lp_remote_browse_sync(void);
+bool lp_nmbd_bind_explicit_broadcast(void);
const char **lp_wins_server_list(void);
const char **lp_interfaces(void);
const char *lp_socket_address(void);
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 96d7b3211e..703e229052 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -80,7 +80,7 @@ static struct subnet_record *make_subnet(const char *name, enum subnet_type type
int dgram_sock = -1;
int nmb_bcast = -1;
int dgram_bcast = -1;
- bool bind_bcast = lp_parm_bool(-1, "nmbd", "bind explicit broadcast", false);
+ bool bind_bcast = lp_nmbd_bind_explicit_broadcast();
/* Check if we are creating a non broadcast subnet - if so don't create
sockets. */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 5bac25c433..d2da10687f 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -160,6 +160,7 @@ struct global {
char *szRemoteAnnounce;
char *szRemoteBrowseSync;
char *szSocketAddress;
+ bool bNmbdBindExplicitBroadcast;
char *szNISHomeMapName;
char *szAnnounceVersion; /* This is initialised in init_globals */
char *szWorkgroup;
@@ -3991,6 +3992,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED,
},
{
+ .label = "nmbd bind explicit broadcast",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .ptr = &Globals.bNmbdBindExplicitBroadcast,
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
+ {
.label = "homedir map",
.type = P_STRING,
.p_class = P_GLOBAL,
@@ -5347,6 +5357,7 @@ FN_GLOBAL_CONST_STRING(lp_logon_drive, &Globals.szLogonDrive)
FN_GLOBAL_CONST_STRING(lp_logon_home, &Globals.szLogonHome)
FN_GLOBAL_STRING(lp_remote_announce, &Globals.szRemoteAnnounce)
FN_GLOBAL_STRING(lp_remote_browse_sync, &Globals.szRemoteBrowseSync)
+FN_GLOBAL_BOOL(lp_nmbd_bind_explicit_broadcast, &Globals.bNmbdBindExplicitBroadcast)
FN_GLOBAL_LIST(lp_wins_server_list, &Globals.szWINSservers)
FN_GLOBAL_LIST(lp_interfaces, &Globals.szInterfaces)
FN_GLOBAL_STRING(lp_nis_home_map_name, &Globals.szNISHomeMapName)