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
552af8b9
Commit
552af8b9
authored
Feb 29, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix --localise-queries via interface lo bug.
parent
4f8ff361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
CHANGELOG
CHANGELOG
+5
-0
src/forward.c
src/forward.c
+27
-6
No files found.
CHANGELOG
View file @
552af8b9
...
@@ -71,6 +71,11 @@ version 2.60
...
@@ -71,6 +71,11 @@ version 2.60
configuration from the DHCPv6 conf, and should just need
configuration from the DHCPv6 conf, and should just need
enabling with --enable-ra.
enabling with --enable-ra.
Fix long-standing wrinkle with --localise-queries that
could result in wrong answers when DNS packets arrive
via an interface other than the expected one. Thanks to
Lorenzo Milesi and John Hanks for spotting this one.
version 2.59
version 2.59
Fix regression in 2.58 which caused failure to start up
Fix regression in 2.58 which caused failure to start up
...
...
src/forward.c
View file @
552af8b9
...
@@ -766,12 +766,33 @@ void receive_query(struct listener *listen, time_t now)
...
@@ -766,12 +766,33 @@ void receive_query(struct listener *listen, time_t now)
!
iface_check
(
listen
->
family
,
&
dst_addr
,
ifr
.
ifr_name
))
!
iface_check
(
listen
->
family
,
&
dst_addr
,
ifr
.
ifr_name
))
return
;
return
;
if
(
listen
->
family
==
AF_INET
&&
if
(
listen
->
family
==
AF_INET
&&
option_bool
(
OPT_LOCALISE
))
option_bool
(
OPT_LOCALISE
)
&&
{
ioctl
(
listen
->
fd
,
SIOCGIFNETMASK
,
&
ifr
)
==
-
1
)
struct
irec
*
iface
;
return
;
/* get the netmask of the interface whch has the address we were sent to.
netmask
=
((
struct
sockaddr_in
*
)
&
ifr
.
ifr_addr
)
->
sin_addr
;
This is no neccessarily the interface we arrived on. */
for
(
iface
=
daemon
->
interfaces
;
iface
;
iface
=
iface
->
next
)
if
(
iface
->
addr
.
sa
.
sa_family
==
AF_INET
&&
iface
->
addr
.
in
.
sin_addr
.
s_addr
==
dst_addr_4
.
s_addr
)
break
;
/* interface may be new */
if
(
!
iface
)
enumerate_interfaces
();
for
(
iface
=
daemon
->
interfaces
;
iface
;
iface
=
iface
->
next
)
if
(
iface
->
addr
.
sa
.
sa_family
==
AF_INET
&&
iface
->
addr
.
in
.
sin_addr
.
s_addr
==
dst_addr_4
.
s_addr
)
break
;
/* If we failed, abandon localisation */
if
(
iface
)
netmask
=
iface
->
netmask
;
else
dst_addr_4
.
s_addr
=
0
;
}
}
}
if
(
extract_request
(
header
,
(
size_t
)
n
,
daemon
->
namebuff
,
&
type
))
if
(
extract_request
(
header
,
(
size_t
)
n
,
daemon
->
namebuff
,
&
type
))
...
...
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