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
921360ce
Commit
921360ce
authored
May 31, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add constructor-noauth: keyword
parent
429805db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
2 deletions
+17
-2
man/dnsmasq.8
man/dnsmasq.8
+10
-2
src/auth.c
src/auth.c
+1
-0
src/dnsmasq.h
src/dnsmasq.h
+1
-0
src/option.c
src/option.c
+5
-0
No files found.
man/dnsmasq.8
View file @
921360ce
...
@@ -574,9 +574,11 @@ needed for a client to do validation itself.
...
@@ -574,9 +574,11 @@ needed for a client to do validation itself.
.TP
.TP
.B --auth-zone=<domain>[,<subnet>[/<prefix length>][,<subnet>[/<prefix length>].....]]
.B --auth-zone=<domain>[,<subnet>[/<prefix length>][,<subnet>[/<prefix length>].....]]
Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain
Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain
will be served
, except that
A and AAAA records must be in one of the
will be served
.
A and AAAA records must be in one of the
specified subnets, or in a subnet corresponding to a constructed DHCP
specified subnets, or in a subnet corresponding to a constructed DHCP
range. The subnet(s) are also used to define in-addr.arpa and
range. (This can be overridden with
.B constructor-noauth:
) The subnet(s) are also used to define in-addr.arpa and
ipv6.arpa domains which are served for reverse-DNS queries. If not
ipv6.arpa domains which are served for reverse-DNS queries. If not
specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6.
specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6.
For IPv4 subnets, the prefix length should be have the value 8, 16 or 24
For IPv4 subnets, the prefix length should be have the value 8, 16 or 24
...
@@ -660,6 +662,12 @@ equal either the start or end address given in the dhcp-range. This is
...
@@ -660,6 +662,12 @@ equal either the start or end address given in the dhcp-range. This is
to prevent prefixes becoming perpetual if the interface
to prevent prefixes becoming perpetual if the interface
gains a SLAAC address for the prefix when it is advertised by dnsmasq.
gains a SLAAC address for the prefix when it is advertised by dnsmasq.
There is a variant of the constructor: syntax using the keyword
.B constructor-noauth.
See
.B --auth-zone
for an explanation of this.
The optional
The optional
.B set:<tag>
.B set:<tag>
sets an alphanumeric label which marks this network so that
sets an alphanumeric label which marks this network so that
...
...
src/auth.c
View file @
921360ce
...
@@ -54,6 +54,7 @@ static int filter_constructed_dhcp(struct auth_zone *zone, int flag, struct all_
...
@@ -54,6 +54,7 @@ static int filter_constructed_dhcp(struct auth_zone *zone, int flag, struct all_
if
(
flag
&
F_IPV6
)
if
(
flag
&
F_IPV6
)
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
if
((
context
->
flags
&
CONTEXT_CONSTRUCTED
)
&&
if
((
context
->
flags
&
CONTEXT_CONSTRUCTED
)
&&
!
(
context
->
flags
&
CONTEXT_NOAUTH
)
&&
is_same_net6
(
&
(
addr_u
->
addr
.
addr6
),
&
context
->
start6
,
context
->
prefix
))
is_same_net6
(
&
(
addr_u
->
addr
.
addr6
),
&
context
->
start6
,
context
->
prefix
))
return
1
;
return
1
;
#endif
#endif
...
...
src/dnsmasq.h
View file @
921360ce
...
@@ -731,6 +731,7 @@ struct dhcp_context {
...
@@ -731,6 +731,7 @@ struct dhcp_context {
#define CONTEXT_RA 8192
#define CONTEXT_RA 8192
#define CONTEXT_CONF_USED 16384
#define CONTEXT_CONF_USED 16384
#define CONTEXT_USED 32768
#define CONTEXT_USED 32768
#define CONTEXT_NOAUTH 65536
struct
ping_result
{
struct
ping_result
{
struct
in_addr
addr
;
struct
in_addr
addr
;
...
...
src/option.c
View file @
921360ce
...
@@ -2409,6 +2409,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
...
@@ -2409,6 +2409,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
new
->
template_interface
=
opt_string_alloc
(
a
[
leasepos
]
+
12
);
new
->
template_interface
=
opt_string_alloc
(
a
[
leasepos
]
+
12
);
new
->
flags
|=
CONTEXT_TEMPLATE
;
new
->
flags
|=
CONTEXT_TEMPLATE
;
}
}
else
if
(
strstr
(
a
[
leasepos
],
"constructor-noauth:"
)
==
a
[
leasepos
])
{
new
->
template_interface
=
opt_string_alloc
(
a
[
leasepos
]
+
19
);
new
->
flags
|=
CONTEXT_TEMPLATE
|
CONTEXT_NOAUTH
;
}
else
else
break
;
break
;
}
}
...
...
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