mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 18:44:10 +08:00
Rename dhcp6_prefix to delegated_dhcp6_prefix incase a user makes a
DHCPv6 option just called prefix. Send delegated interfaces to listeners as well.
This commit is contained in:
parent
f9e1cf0303
commit
369d1314de
7
dhcp6.c
7
dhcp6.c
@ -1175,6 +1175,9 @@ dhcp6_dadcompleted(const struct interface *ifp)
|
||||
const struct ipv6_addr *ap;
|
||||
|
||||
state = D6_CSTATE(ifp);
|
||||
if (!TAILQ_FIRST(&state->addrs))
|
||||
return 0;
|
||||
|
||||
TAILQ_FOREACH(ap, &state->addrs, next) {
|
||||
if (ap->flags & IPV6_AF_ADDED &&
|
||||
!(ap->flags & IPV6_AF_DADCOMPLETED))
|
||||
@ -3393,13 +3396,13 @@ delegated:
|
||||
}
|
||||
}
|
||||
if (env && i) {
|
||||
i += strlen(prefix) + strlen("_dhcp6_prefix=");
|
||||
i += strlen(prefix) + strlen("_delegated_dhcp6_prefix=");
|
||||
v = val = env[n] = malloc(i);
|
||||
if (v == NULL) {
|
||||
syslog(LOG_ERR, "%s: %m", __func__);
|
||||
return -1;
|
||||
}
|
||||
v += snprintf(val, i, "%s_dhcp6_prefix=", prefix);
|
||||
v += snprintf(val, i, "%s_delegated_dhcp6_prefix=", prefix);
|
||||
TAILQ_FOREACH(ap, &state->addrs, next) {
|
||||
if (ap->delegating_iface) {
|
||||
/* Can't use stpcpy(3) due to "security" */
|
||||
|
2
dhcp6.h
2
dhcp6.h
@ -208,7 +208,7 @@ struct dhcp6_state {
|
||||
#define D6_CSTATE(ifp) \
|
||||
((const struct dhcp6_state *)(ifp)->if_data[IF_DATA_DHCP6])
|
||||
#define D6_STATE_RUNNING(ifp) \
|
||||
(D6_CSTATE((ifp)) && D6_CSTATE((ifp))->new && \
|
||||
(D6_CSTATE((ifp)) && \
|
||||
D6_CSTATE((ifp))->reason && dhcp6_dadcompleted((ifp)))
|
||||
|
||||
#define D6_FIRST_OPTION(m) \
|
||||
|
@ -22,7 +22,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd August 1, 2014
|
||||
.Dd August 3, 2014
|
||||
.Dt DHCPCD-RUN-HOOKS 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -136,7 +136,7 @@ and
|
||||
.Ev $RC_SVCNAME .
|
||||
The following variables will then be set, along with any protocol supplied
|
||||
ones.
|
||||
.Bl -tag -width xnew_dhcp6_prefix
|
||||
.Bl -tag -width xnew_delegated_dhcp6_prefix
|
||||
.It Ev $interface
|
||||
the name of the interface.
|
||||
.It Ev $reason
|
||||
@ -194,7 +194,7 @@ requirements specified in
|
||||
.It Ev $profile
|
||||
the name of the profile selected from
|
||||
.Xr dhcpcd.conf 5 .
|
||||
.It Ev $new_dhcp6_prefix
|
||||
.It Ev $new_delegated_dhcp6_prefix
|
||||
space separated list of delegated prefixes.
|
||||
.El
|
||||
.Sh FILES
|
||||
|
Loading…
Reference in New Issue
Block a user