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
b49644f3
Commit
b49644f3
authored
Jan 30, 2004
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import of dnsmasq-2.2.tar.gz
parent
1ab84e2f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
21 deletions
+33
-21
CHANGELOG
CHANGELOG
+6
-0
dnsmasq-mdk.spec
dnsmasq-mdk.spec
+1
-1
dnsmasq-rh.spec
dnsmasq-rh.spec
+1
-1
dnsmasq-suse.spec
dnsmasq-suse.spec
+1
-1
dnsmasq.8
dnsmasq.8
+12
-8
src/config.h
src/config.h
+3
-2
src/network.c
src/network.c
+9
-8
No files found.
CHANGELOG
View file @
b49644f3
...
@@ -713,3 +713,9 @@ release 2.1
...
@@ -713,3 +713,9 @@ release 2.1
Fix problem with setting domains as "local only".
Fix problem with setting domains as "local only".
Added support for max message size DHCP option.
Added support for max message size DHCP option.
release 2.2
Fix total lack for DHCP functionality on
Linux systems with IPv6 enabled.
Move default config file under FreeBSD.
dnsmasq-mdk.spec
View file @
b49644f3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
###############################################################################
###############################################################################
Name: dnsmasq
Name: dnsmasq
Version: 2.
1
Version: 2.
2
Release: 1
Release: 1
Copyright: GPL
Copyright: GPL
Group: System Environment/Daemons
Group: System Environment/Daemons
...
...
dnsmasq-rh.spec
View file @
b49644f3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
###############################################################################
###############################################################################
Name: dnsmasq
Name: dnsmasq
Version: 2.
1
Version: 2.
2
Release: 1
Release: 1
Copyright: GPL
Copyright: GPL
Group: System Environment/Daemons
Group: System Environment/Daemons
...
...
dnsmasq-suse.spec
View file @
b49644f3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
###############################################################################
###############################################################################
Name: dnsmasq
Name: dnsmasq
Version: 2.
1
Version: 2.
2
Release: 1
Release: 1
Copyright: GPL
Copyright: GPL
Group: Productivity/Networking/DNS/Servers
Group: Productivity/Networking/DNS/Servers
...
...
dnsmasq.8
View file @
b49644f3
...
@@ -132,7 +132,7 @@ time is the one used.
...
@@ -132,7 +132,7 @@ time is the one used.
.TP
.TP
.B \-R, --no-resolv
.B \-R, --no-resolv
Don't read /etc/resolv.conf. Get upstream servers only from the command
Don't read /etc/resolv.conf. Get upstream servers only from the command
line or
/etc/dnsmasq.conf
.
line or
the dnsmasq configuration file
.
.TP
.TP
.B \-o, --strict-order
.B \-o, --strict-order
By default, dnsmasq will send queries to any of the upstream servers
By default, dnsmasq will send queries to any of the upstream servers
...
@@ -307,10 +307,11 @@ both as "laptop" and "laptop.thekelleys.org.uk".
...
@@ -307,10 +307,11 @@ both as "laptop" and "laptop.thekelleys.org.uk".
Add the domain-suffix to simple names (without a period) in /etc/hosts
Add the domain-suffix to simple names (without a period) in /etc/hosts
in the same way as for DHCP-derived names.
in the same way as for DHCP-derived names.
.SH CONFIG FILE
.SH CONFIG FILE
At startup, dnsmasq reads /etc/dnsmasq.conf, if it exists. The format of this
At startup, dnsmasq reads /etc/dnsmasq.conf, if it exists. (On
FreeBSD, the file is /usr/local/etc/dnsmasq.conf) The format of this
file consists of one option per line, exactly as the long options detailed
file consists of one option per line, exactly as the long options detailed
in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For
in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For
options which may only be specified once,
/etc/dnsmasq.conf
overrides
options which may only be specified once,
the configuration file
overrides
the command line. Use the --conf-file option to specify a different
the command line. Use the --conf-file option to specify a different
configuration file.
configuration file.
.SH NOTES
.SH NOTES
...
@@ -320,7 +321,7 @@ clears its cache and then re-loads /etc/hosts. If
...
@@ -320,7 +321,7 @@ clears its cache and then re-loads /etc/hosts. If
.B
.B
--no-poll
--no-poll
is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP
is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP
does NOT re-read
/etc/dnsmasq.conf
.
does NOT re-read
the configuration file
.
.PP
.PP
When it receives a SIGUSR1,
When it receives a SIGUSR1,
.B dnsmasq
.B dnsmasq
...
@@ -365,7 +366,7 @@ dnsmasq can be set to poll both /etc/ppp/resolv.conf and
...
@@ -365,7 +366,7 @@ dnsmasq can be set to poll both /etc/ppp/resolv.conf and
last, giving automatic switching between DNS servers.
last, giving automatic switching between DNS servers.
.PP
.PP
Upstream servers may also be specified on the command line or in
Upstream servers may also be specified on the command line or in
/etc/dnsmasq.conf
. These server specifications optionally take a
the configuration file
. These server specifications optionally take a
domain name which tells dnsmasq to use that server only to find names
domain name which tells dnsmasq to use that server only to find names
in that particular domain.
in that particular domain.
.PP
.PP
...
@@ -382,17 +383,20 @@ and run dnsmasq with the
...
@@ -382,17 +383,20 @@ and run dnsmasq with the
option. This second technique allows for dynamic update of the server
option. This second technique allows for dynamic update of the server
addresses by PPP or DHCP.
addresses by PPP or DHCP.
.SH FILES
.SH FILES
.IR /etc/dnsmasq.conf
.IR /etc/dnsmasq.conf
.IR /usr/local/etc/dnsmasq.conf
.IR /etc/resolv.conf
.IR /etc/resolv.conf
.IR /etc/hosts
.IR /etc/hosts
.IR /var/lib/misc/dnsmasq.leases
.IR /var/lib/misc/dnsmasq.leases
.IR /var/db/dnsmasq.leases
.IR /var/run/dnsmasq.pid
.IR /var/run/dnsmasq.pid
.SH SEE ALSO
.SH SEE ALSO
.BR dhcp.leases (5),
.BR hosts (5),
.BR hosts (5),
.BR resolver (5)
.BR resolver (5)
.SH AUTHOR
.SH AUTHOR
...
...
src/config.h
View file @
b49644f3
...
@@ -12,14 +12,13 @@
...
@@ -12,14 +12,13 @@
/* Author's email: simon@thekelleys.org.uk */
/* Author's email: simon@thekelleys.org.uk */
#define VERSION "2.
1
"
#define VERSION "2.
2
"
#define FTABSIZ 150
/* max number of outstanding requests */
#define FTABSIZ 150
/* max number of outstanding requests */
#define TIMEOUT 40
/* drop queries after TIMEOUT seconds */
#define TIMEOUT 40
/* drop queries after TIMEOUT seconds */
#define LOGRATE 120
/* log table overflows every LOGRATE seconds */
#define LOGRATE 120
/* log table overflows every LOGRATE seconds */
#define CACHESIZ 150
/* default cache size */
#define CACHESIZ 150
/* default cache size */
#define SMALLDNAME 40
/* most domain names are smaller than this */
#define SMALLDNAME 40
/* most domain names are smaller than this */
#define CONFFILE "/etc/dnsmasq.conf"
#define HOSTSFILE "/etc/hosts"
#define HOSTSFILE "/etc/hosts"
#ifdef __uClinux__
#ifdef __uClinux__
# define RESOLVFILE "/etc/config/resolv.conf"
# define RESOLVFILE "/etc/config/resolv.conf"
...
@@ -29,8 +28,10 @@
...
@@ -29,8 +28,10 @@
#define RUNFILE "/var/run/dnsmasq.pid"
#define RUNFILE "/var/run/dnsmasq.pid"
#ifdef __FreeBSD__
#ifdef __FreeBSD__
# define LEASEFILE "/var/db/dnsmasq.leases"
# define LEASEFILE "/var/db/dnsmasq.leases"
# define CONFFILE "/usr/local/etc/dnsmasq.conf"
#else
#else
# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
# define CONFFILE "/etc/dnsmasq.conf"
#endif
#endif
#define DEFLEASE 3600
/* default lease time, 1 hour */
#define DEFLEASE 3600
/* default lease time, 1 hour */
#define CHUSER "nobody"
#define CHUSER "nobody"
...
...
src/network.c
View file @
b49644f3
...
@@ -218,7 +218,8 @@ char *enumerate_interfaces(struct irec **interfacep,
...
@@ -218,7 +218,8 @@ char *enumerate_interfaces(struct irec **interfacep,
{
{
FILE
*
f
=
fopen
(
IP6INTERFACES
,
"r"
);
FILE
*
f
=
fopen
(
IP6INTERFACES
,
"r"
);
int
found
=
0
;
int
found
=
0
;
union
mysockaddr
addr6
;
if
(
f
)
if
(
f
)
{
{
unsigned
int
plen
,
scope
,
flags
,
if_idx
;
unsigned
int
plen
,
scope
,
flags
,
if_idx
;
...
@@ -230,18 +231,18 @@ char *enumerate_interfaces(struct irec **interfacep,
...
@@ -230,18 +231,18 @@ char *enumerate_interfaces(struct irec **interfacep,
if
(
strcmp
(
devname
,
ifr
->
ifr_name
)
==
0
)
if
(
strcmp
(
devname
,
ifr
->
ifr_name
)
==
0
)
{
{
int
i
;
int
i
;
unsigned
char
*
addr6p
=
(
unsigned
char
*
)
&
addr
.
in6
.
sin6_addr
;
unsigned
char
*
addr6p
=
(
unsigned
char
*
)
&
addr
6
.
in6
.
sin6_addr
;
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memset
(
&
addr
6
,
0
,
sizeof
(
addr6
));
addr
.
sa
.
sa_family
=
AF_INET6
;
addr
6
.
sa
.
sa_family
=
AF_INET6
;
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
i
=
0
;
i
<
16
;
i
++
)
{
{
unsigned
int
byte
;
unsigned
int
byte
;
sscanf
(
addrstring
+
i
+
i
,
"%02x"
,
&
byte
);
sscanf
(
addrstring
+
i
+
i
,
"%02x"
,
&
byte
);
addr6p
[
i
]
=
byte
;
addr6p
[
i
]
=
byte
;
}
}
addr
.
in6
.
sin6_port
=
htons
(
port
);
addr
6
.
in6
.
sin6_port
=
htons
(
port
);
addr
.
in6
.
sin6_flowinfo
=
htonl
(
0
);
addr
6
.
in6
.
sin6_flowinfo
=
htonl
(
0
);
addr
.
in6
.
sin6_scope_id
=
htonl
(
scope
);
addr
6
.
in6
.
sin6_scope_id
=
htonl
(
scope
);
found
=
1
;
found
=
1
;
break
;
break
;
...
@@ -253,7 +254,7 @@ char *enumerate_interfaces(struct irec **interfacep,
...
@@ -253,7 +254,7 @@ char *enumerate_interfaces(struct irec **interfacep,
if
(
found
&&
if
(
found
&&
(
err
=
add_iface
(
interfacep
,
ifr
->
ifr_flags
,
ifr
->
ifr_name
,
(
err
=
add_iface
(
interfacep
,
ifr
->
ifr_flags
,
ifr
->
ifr_name
,
&
addr
,
names
,
addrs
,
except
)))
&
addr
6
,
names
,
addrs
,
except
)))
goto
end
;
goto
end
;
}
}
...
...
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