summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/modifiers.go
diff options
context:
space:
mode:
Diffstat (limited to 'dhcpv6/modifiers.go')
-rw-r--r--dhcpv6/modifiers.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/dhcpv6/modifiers.go b/dhcpv6/modifiers.go
index ce5ce97..ffea9ed 100644
--- a/dhcpv6/modifiers.go
+++ b/dhcpv6/modifiers.go
@@ -119,3 +119,13 @@ func WithRequestedOptions(codes ...OptionCode) Modifier {
}
}
}
+
+// WithDHCP4oDHCP6Server adds or updates an OptDHCP4oDHCP6Server
+func WithDHCP4oDHCP6Server(addrs ...net.IP) Modifier {
+ return func(d DHCPv6) {
+ opt := OptDHCP4oDHCP6Server{
+ DHCP4oDHCP6Servers: addrs,
+ }
+ d.UpdateOption(&opt)
+ }
+}