Effectively:
-inherit the P flag from upstream, but retain the possibility to disable
its availability downstream, if any of the following are disabled:
-DHCPv6
-DHCPv6-PD
-DHCPv6-PD Preferred
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/odhcpd/pull/317
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
// MTU option
struct nd_opt_mtu *mtu_opt = NULL;
uint32_t ingress_mtu_val = 0;
// MTU option
struct nd_opt_mtu *mtu_opt = NULL;
uint32_t ingress_mtu_val = 0;
- /* PIO L/A flag and RA M/O Flags */
+ /* PIO L/A/R/P flag and RA M/O Flags */
uint8_t ra_flags;
size_t pio_count = 0;
struct fwd_pio_flags {
uint8_t ra_flags;
size_t pio_count = 0;
struct fwd_pio_flags {
*/
if (!c->ra_slaac)
*pio_flags[i].ptr &= ~ND_OPT_PI_FLAG_AUTO;/* ensure A flag cleared */
*/
if (!c->ra_slaac)
*pio_flags[i].ptr &= ~ND_OPT_PI_FLAG_AUTO;/* ensure A flag cleared */
+
+ /* we have no opinion on the R flag - it can be forwarded */
+
+ if (c->dhcpv6 == MODE_DISABLED || !c->dhcpv6_pd || !c->dhcpv6_pd_preferred)
+ *pio_flags[i].ptr &= ~ND_OPT_PI_FLAG_PD_PREFERRED;/* ensure P flag (DHCPv6-PD) cleared */
}
/* Apply per-interface modifications of upstream RA state */
}
/* Apply per-interface modifications of upstream RA state */