mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
tweak Lua script argument passing and add --dhcp-luascript sectino to manpage.
This commit is contained in:
@@ -298,8 +298,10 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
|
||||
|
||||
if (is6)
|
||||
{
|
||||
lua_pushstring(lua, daemon->dhcp_buff);
|
||||
lua_setfield(lua, -2, "client_duid");
|
||||
lua_pushstring(lua, daemon->packet);
|
||||
lua_setfield(lua, -2, "duid");
|
||||
lua_setfield(lua, -2, "server_duid");
|
||||
lua_pushstring(lua, daemon->dhcp_buff3);
|
||||
lua_setfield(lua, -2, "iaid");
|
||||
}
|
||||
@@ -440,7 +442,7 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
|
||||
if (is6)
|
||||
{
|
||||
my_setenv("DNSMASQ_IAID", daemon->dhcp_buff3, &err);
|
||||
my_setenv("DNSMASQ_DUID", daemon->packet, &err);
|
||||
my_setenv("DNSMASQ_SERVER_DUID", daemon->packet, &err);
|
||||
}
|
||||
|
||||
if (!is6 && data.clid_len != 0)
|
||||
|
||||
@@ -2096,7 +2096,7 @@ static void do_options(struct dhcp_context *context,
|
||||
|
||||
/* filter options based on tags, those we want get DHOPT_TAGOK bit set */
|
||||
context->netid.next = NULL;
|
||||
tagif = option_filter(netid, context->netid.net ? &context->netid : NULL, config_opts);
|
||||
tagif = option_filter(netid, context && context->netid.net ? &context->netid : NULL, config_opts);
|
||||
|
||||
/* logging */
|
||||
if (option_bool(OPT_LOG_OPTS) && req_options)
|
||||
|
||||
Reference in New Issue
Block a user