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
61ce600b
Commit
61ce600b
authored
Apr 20, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--tftp-lowercase option.
parent
7a14dfeb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
CHANGELOG
CHANGELOG
+3
-0
man/dnsmasq.8
man/dnsmasq.8
+6
-0
src/dnsmasq.h
src/dnsmasq.h
+2
-1
src/option.c
src/option.c
+3
-0
src/tftp.c
src/tftp.c
+6
-3
No files found.
CHANGELOG
View file @
61ce600b
...
@@ -93,6 +93,9 @@ version 2.61
...
@@ -93,6 +93,9 @@ version 2.61
Give correct from-cache answers to explict CNAME queries.
Give correct from-cache answers to explict CNAME queries.
Thanks to Rob Zwissler for spotting this.
Thanks to Rob Zwissler for spotting this.
Add --dhcp-lowercase option. Thanks to Oliver Rath for the
patch.
version 2.60
version 2.60
Fix compilation problem in Mac OS X Lion. Thanks to Olaf
Fix compilation problem in Mac OS X Lion. Thanks to Olaf
...
...
man/dnsmasq.8
View file @
61ce600b
...
@@ -1385,6 +1385,12 @@ are accessible. It is not recommended to run dnsmasq as root with TFTP
...
@@ -1385,6 +1385,12 @@ are accessible. It is not recommended to run dnsmasq as root with TFTP
enabled, and certainly not without specifying --tftp-root. Doing so
enabled, and certainly not without specifying --tftp-root. Doing so
can expose any world-readable file on the server to any host on the net.
can expose any world-readable file on the server to any host on the net.
.TP
.TP
.B --tftp-lowercase
Convert filenames in TFTP requests to all lowercase. This is useful
for requests from Windows machines, which have case-insensitive
filesystems and tend to play fast-and-loose with case in filenames.
Note that dnsmasq's tftp server always converts "\\" to "/" in filenames.
.TP
.B --tftp-max=<connections>
.B --tftp-max=<connections>
Set the maximum number of concurrent TFTP connections allowed. This
Set the maximum number of concurrent TFTP connections allowed. This
defaults to 50. When serving a large number of TFTP connections,
defaults to 50. When serving a large number of TFTP connections,
...
...
src/dnsmasq.h
View file @
61ce600b
...
@@ -217,7 +217,8 @@ struct event_desc {
...
@@ -217,7 +217,8 @@ struct event_desc {
#define OPT_CONNTRACK 35
#define OPT_CONNTRACK 35
#define OPT_FQDN_UPDATE 36
#define OPT_FQDN_UPDATE 36
#define OPT_RA 37
#define OPT_RA 37
#define OPT_LAST 38
#define OPT_TFTP_LC 38
#define OPT_LAST 39
/* extra flags for my_syslog, we use a couple of facilities since they are known
/* extra flags for my_syslog, we use a couple of facilities since they are known
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
not to occupy the same bits as priorities, no matter how syslog.h is set up. */
...
...
src/option.c
View file @
61ce600b
...
@@ -117,6 +117,7 @@ struct myoption {
...
@@ -117,6 +117,7 @@ struct myoption {
#define LOPT_RA 306
#define LOPT_RA 306
#define LOPT_DUID 307
#define LOPT_DUID 307
#define LOPT_HOST_REC 308
#define LOPT_HOST_REC 308
#define LOPT_TFTP_LC 309
#ifdef HAVE_GETOPT_LONG
#ifdef HAVE_GETOPT_LONG
static
const
struct
option
opts
[]
=
static
const
struct
option
opts
[]
=
...
@@ -196,6 +197,7 @@ static const struct myoption opts[] =
...
@@ -196,6 +197,7 @@ static const struct myoption opts[] =
{
"tftp-unique-root"
,
0
,
0
,
LOPT_APREF
},
{
"tftp-unique-root"
,
0
,
0
,
LOPT_APREF
},
{
"tftp-root"
,
1
,
0
,
LOPT_PREFIX
},
{
"tftp-root"
,
1
,
0
,
LOPT_PREFIX
},
{
"tftp-max"
,
1
,
0
,
LOPT_TFTP_MAX
},
{
"tftp-max"
,
1
,
0
,
LOPT_TFTP_MAX
},
{
"tftp-lowercase"
,
0
,
0
,
LOPT_TFTP_LC
},
{
"ptr-record"
,
1
,
0
,
LOPT_PTR
},
{
"ptr-record"
,
1
,
0
,
LOPT_PTR
},
{
"naptr-record"
,
1
,
0
,
LOPT_NAPTR
},
{
"naptr-record"
,
1
,
0
,
LOPT_NAPTR
},
{
"bridge-interface"
,
1
,
0
,
LOPT_BRIDGE
},
{
"bridge-interface"
,
1
,
0
,
LOPT_BRIDGE
},
...
@@ -342,6 +344,7 @@ static struct {
...
@@ -342,6 +344,7 @@ static struct {
{
LOPT_SECURE
,
OPT_TFTP_SECURE
,
NULL
,
gettext_noop
(
"Allow access only to files owned by the user running dnsmasq."
),
NULL
},
{
LOPT_SECURE
,
OPT_TFTP_SECURE
,
NULL
,
gettext_noop
(
"Allow access only to files owned by the user running dnsmasq."
),
NULL
},
{
LOPT_TFTP_MAX
,
ARG_ONE
,
"<integer>"
,
gettext_noop
(
"Maximum number of conncurrent TFTP transfers (defaults to %s)."
),
"#"
},
{
LOPT_TFTP_MAX
,
ARG_ONE
,
"<integer>"
,
gettext_noop
(
"Maximum number of conncurrent TFTP transfers (defaults to %s)."
),
"#"
},
{
LOPT_NOBLOCK
,
OPT_TFTP_NOBLOCK
,
NULL
,
gettext_noop
(
"Disable the TFTP blocksize extension."
),
NULL
},
{
LOPT_NOBLOCK
,
OPT_TFTP_NOBLOCK
,
NULL
,
gettext_noop
(
"Disable the TFTP blocksize extension."
),
NULL
},
{
LOPT_TFTP_LC
,
OPT_TFTP_LC
,
NULL
,
gettext_noop
(
"Convert TFTP filenames to lowercase"
),
NULL
},
{
LOPT_TFTPPORTS
,
ARG_ONE
,
"<start>,<end>"
,
gettext_noop
(
"Ephemeral port range for use by TFTP transfers."
),
NULL
},
{
LOPT_TFTPPORTS
,
ARG_ONE
,
"<start>,<end>"
,
gettext_noop
(
"Ephemeral port range for use by TFTP transfers."
),
NULL
},
{
LOPT_LOG_OPTS
,
OPT_LOG_OPTS
,
NULL
,
gettext_noop
(
"Extra logging for DHCP."
),
NULL
},
{
LOPT_LOG_OPTS
,
OPT_LOG_OPTS
,
NULL
,
gettext_noop
(
"Extra logging for DHCP."
),
NULL
},
{
LOPT_MAX_LOGS
,
ARG_ONE
,
"[=<integer>]"
,
gettext_noop
(
"Enable async. logging; optionally set queue length."
),
NULL
},
{
LOPT_MAX_LOGS
,
ARG_ONE
,
"[=<integer>]"
,
gettext_noop
(
"Enable async. logging; optionally set queue length."
),
NULL
},
...
...
src/tftp.c
View file @
61ce600b
...
@@ -345,9 +345,12 @@ void tftp_request(struct listener *listen, time_t now)
...
@@ -345,9 +345,12 @@ void tftp_request(struct listener *listen, time_t now)
}
}
/* cope with backslashes from windows boxen. */
/* cope with backslashes from windows boxen. */
while
((
p
=
strchr
(
filename
,
'\\'
)))
for
(
p
=
filename
;
*
p
;
p
++
)
*
p
=
'/'
;
if
(
*
p
==
'\\'
)
*
p
=
'/'
;
else
if
(
option_bool
(
OPT_TFTP_LC
))
*
p
=
tolower
(
*
p
);
strcpy
(
daemon
->
namebuff
,
"/"
);
strcpy
(
daemon
->
namebuff
,
"/"
);
if
(
prefix
)
if
(
prefix
)
{
{
...
...
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