diff options
Diffstat (limited to 'dhcpv6/dhcpv6relay.go')
-rw-r--r-- | dhcpv6/dhcpv6relay.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/dhcpv6/dhcpv6relay.go b/dhcpv6/dhcpv6relay.go index 6245b81..21057f9 100644 --- a/dhcpv6/dhcpv6relay.go +++ b/dhcpv6/dhcpv6relay.go @@ -178,14 +178,13 @@ func (r *RelayMessage) GetInnerMessage() (*Message, error) { // NewRelayReplFromRelayForw creates a MessageTypeRelayReply based on a // MessageTypeRelayForward and replaces the inner message with the passed -// DHCPv6 message. It copies the OptionInterfaceID and OptionRemoteID if the -// options are present in the Relay packet. +// DHCPv6 message. It copies the OptionInterfaceID if the option is +// present in the Relay packet. func NewRelayReplFromRelayForw(relay *RelayMessage, msg *Message) (DHCPv6, error) { var ( err error linkAddr, peerAddr []net.IP optiid []Option - optrid []Option ) if relay == nil { return nil, errors.New("Relay message cannot be nil") @@ -200,7 +199,6 @@ func NewRelayReplFromRelayForw(relay *RelayMessage, msg *Message) (DHCPv6, error linkAddr = append(linkAddr, relay.LinkAddr) peerAddr = append(peerAddr, relay.PeerAddr) optiid = append(optiid, relay.GetOneOption(OptionInterfaceID)) - optrid = append(optrid, relay.GetOneOption(OptionRemoteID)) decap, err := DecapsulateRelay(relay) if err != nil { return nil, err @@ -220,9 +218,6 @@ func NewRelayReplFromRelayForw(relay *RelayMessage, msg *Message) (DHCPv6, error if opt := optiid[i]; opt != nil { m.AddOption(opt) } - if opt := optrid[i]; opt != nil { - m.AddOption(opt) - } } return m, nil } |