summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv6/dhcpv6relay.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/dhcpv6/dhcpv6relay.go b/dhcpv6/dhcpv6relay.go
index d9555cb..f7125b1 100644
--- a/dhcpv6/dhcpv6relay.go
+++ b/dhcpv6/dhcpv6relay.go
@@ -165,6 +165,7 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) {
err error
linkAddr, peerAddr []net.IP
optiids []Option
+ optrid []Option
)
if relayForw == nil {
return nil, errors.New("RELAY_FORW cannot be nil")
@@ -186,6 +187,7 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) {
linkAddr = append(linkAddr, relay.LinkAddr())
peerAddr = append(peerAddr, relay.PeerAddr())
optiids = append(optiids, relay.GetOneOption(OptionInterfaceID))
+ optrid = append(optrid, relay.GetOneOption(OptionRemoteID))
decap, err := DecapsulateRelay(relay)
if err != nil {
return nil, err
@@ -201,6 +203,9 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) {
if opt := optiids[i]; opt != nil {
msg.AddOption(opt)
}
+ if opt := optrid[i]; opt != nil {
+ msg.AddOption(opt)
+ }
if err != nil {
return nil, err
}