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
0ddb8769
Commit
0ddb8769
authored
Jun 10, 2015
by
Neil Jerram
Committed by
Simon Kelley
Jun 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend --bridge-interface aliasing to DHCPv6.
parent
654f59e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
src/dhcp6.c
src/dhcp6.c
+27
-1
No files found.
src/dhcp6.c
View file @
0ddb8769
...
@@ -144,6 +144,8 @@ void dhcp6_packet(time_t now)
...
@@ -144,6 +144,8 @@ void dhcp6_packet(time_t now)
if
((
port
=
relay_reply6
(
&
from
,
sz
,
ifr
.
ifr_name
))
==
0
)
if
((
port
=
relay_reply6
(
&
from
,
sz
,
ifr
.
ifr_name
))
==
0
)
{
{
struct
dhcp_bridge
*
bridge
,
*
alias
;
for
(
tmp
=
daemon
->
if_except
;
tmp
;
tmp
=
tmp
->
next
)
for
(
tmp
=
daemon
->
if_except
;
tmp
;
tmp
=
tmp
->
next
)
if
(
tmp
->
name
&&
wildcard_match
(
tmp
->
name
,
ifr
.
ifr_name
))
if
(
tmp
->
name
&&
wildcard_match
(
tmp
->
name
,
ifr
.
ifr_name
))
return
;
return
;
...
@@ -160,6 +162,30 @@ void dhcp6_packet(time_t now)
...
@@ -160,6 +162,30 @@ void dhcp6_packet(time_t now)
memset
(
&
parm
.
fallback
,
0
,
IN6ADDRSZ
);
memset
(
&
parm
.
fallback
,
0
,
IN6ADDRSZ
);
memset
(
&
parm
.
ll_addr
,
0
,
IN6ADDRSZ
);
memset
(
&
parm
.
ll_addr
,
0
,
IN6ADDRSZ
);
memset
(
&
parm
.
ula_addr
,
0
,
IN6ADDRSZ
);
memset
(
&
parm
.
ula_addr
,
0
,
IN6ADDRSZ
);
/* If the interface on which the DHCPv6 request was received is
an alias of some other interface (as specified by the
--bridge-interfaces option), change parm.ind so that we look
for DHCPv6 contexts associated with the aliased interface
instead of with the aliasing one. */
for
(
bridge
=
daemon
->
bridges
;
bridge
;
bridge
=
bridge
->
next
)
{
for
(
alias
=
bridge
->
alias
;
alias
;
alias
=
alias
->
next
)
if
(
wildcard_matchn
(
alias
->
iface
,
ifr
.
ifr_name
,
IF_NAMESIZE
))
{
parm
.
ind
=
if_nametoindex
(
bridge
->
iface
);
if
(
!
parm
.
ind
)
{
my_syslog
(
MS_DHCP
|
LOG_WARNING
,
_
(
"unknown interface %s in bridge-interface"
),
bridge
->
iface
);
return
;
}
break
;
}
if
(
alias
)
break
;
}
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
for
(
context
=
daemon
->
dhcp6
;
context
;
context
=
context
->
next
)
if
(
IN6_IS_ADDR_UNSPECIFIED
(
&
context
->
start6
)
&&
context
->
prefix
==
0
)
if
(
IN6_IS_ADDR_UNSPECIFIED
(
&
context
->
start6
)
&&
context
->
prefix
==
0
)
...
@@ -208,7 +234,7 @@ void dhcp6_packet(time_t now)
...
@@ -208,7 +234,7 @@ void dhcp6_packet(time_t now)
/* May have configured relay, but not DHCP server */
/* May have configured relay, but not DHCP server */
if
(
!
daemon
->
doing_dhcp6
)
if
(
!
daemon
->
doing_dhcp6
)
return
;
return
;
lease_prune
(
NULL
,
now
);
/* lose any expired leases */
lease_prune
(
NULL
,
now
);
/* lose any expired leases */
port
=
dhcp6_reply
(
parm
.
current
,
if_index
,
ifr
.
ifr_name
,
&
parm
.
fallback
,
port
=
dhcp6_reply
(
parm
.
current
,
if_index
,
ifr
.
ifr_name
,
&
parm
.
fallback
,
...
...
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