Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
dd1721c7
Commit
dd1721c7
authored
Feb 18, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DHCPv4 relay-agent options exposed to DHCP-script.
parent
a21e27bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
3 deletions
+32
-3
CHANGELOG
CHANGELOG
+8
-1
man/dnsmasq.8
man/dnsmasq.8
+3
-0
src/helper.c
src/helper.c
+7
-1
src/rfc2131.c
src/rfc2131.c
+14
-1
No files found.
CHANGELOG
View file @
dd1721c7
...
...
@@ -31,6 +31,13 @@ version 2.66
the local DNS server if dnsmasq is configured to not act
as DNS server, or it's configured to a non-standard port.
Add DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBCRIBER_ID,
DNSMASQ_REMOTE_ID variables to the environment of the
lease-change script (and the correponding Lua). These hold
information inserted into the DHCP request by a DHCP relay
agent. Thanks to Lakefield Communications for providing a
bounty for this addition.
version 2.65
Fix regression which broke forwarding of queries sent via
...
...
man/dnsmasq.8
View file @
dd1721c7
...
...
@@ -1230,6 +1230,9 @@ For IPv4 only:
DNSMASQ_CLIENT_ID if the host provided a client-id.
DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBSCRIBER_ID, DNSMASQ_REMOTE_ID if a
DHCP relay-agent added any of these options.
If the client provides vendor-class, DNSMASQ_VENDOR_CLASS.
For IPv6 only:
...
...
src/helper.c
View file @
dd1721c7
...
...
@@ -397,6 +397,9 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
buf
=
grab_extradata_lua
(
buf
,
end
,
"cpewan_oui"
);
buf
=
grab_extradata_lua
(
buf
,
end
,
"cpewan_serial"
);
buf
=
grab_extradata_lua
(
buf
,
end
,
"cpewan_class"
);
buf
=
grab_extradata_lua
(
buf
,
end
,
"circuit_id"
);
buf
=
grab_extradata_lua
(
buf
,
end
,
"subscriber_id"
);
buf
=
grab_extradata_lua
(
buf
,
end
,
"remote_id"
);
}
buf
=
grab_extradata_lua
(
buf
,
end
,
"tags"
);
...
...
@@ -528,6 +531,9 @@ int create_helper(int event_fd, int err_fd, uid_t uid, gid_t gid, long max_fd)
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_CPEWAN_OUI"
,
&
err
);
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_CPEWAN_SERIAL"
,
&
err
);
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_CPEWAN_CLASS"
,
&
err
);
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_CIRCUIT_ID"
,
&
err
);
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_SUBSCRIBER_ID"
,
&
err
);
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_REMOTE_ID"
,
&
err
);
}
buf
=
grab_extradata
(
buf
,
end
,
"DNSMASQ_TAGS"
,
&
err
);
...
...
src/rfc2131.c
View file @
dd1721c7
...
...
@@ -1257,6 +1257,19 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
add_extradata_opt
(
lease
,
serial
);
add_extradata_opt
(
lease
,
class
);
if
((
opt
=
option_find
(
mess
,
sz
,
OPTION_AGENT_ID
,
1
)))
{
add_extradata_opt
(
lease
,
option_find1
(
option_ptr
(
opt
,
0
),
option_ptr
(
opt
,
option_len
(
opt
)),
SUBOPT_CIRCUIT_ID
,
1
));
add_extradata_opt
(
lease
,
option_find1
(
option_ptr
(
opt
,
0
),
option_ptr
(
opt
,
option_len
(
opt
)),
SUBOPT_SUBSCR_ID
,
1
));
add_extradata_opt
(
lease
,
option_find1
(
option_ptr
(
opt
,
0
),
option_ptr
(
opt
,
option_len
(
opt
)),
SUBOPT_REMOTE_ID
,
1
));
}
else
{
add_extradata_opt
(
lease
,
NULL
);
add_extradata_opt
(
lease
,
NULL
);
add_extradata_opt
(
lease
,
NULL
);
}
/* space-concat tag set */
if
(
!
tagif_netid
)
add_extradata_opt
(
lease
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment