diff options
author | Sean Karlage <skarlage@fb.com> | 2018-08-11 14:30:48 -0700 |
---|---|---|
committer | Sean Karlage <skarlage@fb.com> | 2018-08-11 14:32:26 -0700 |
commit | 8ea2525c898436a2a935580de67727bbe7035c85 (patch) | |
tree | 69d35d17c238feabb07ef07a907aae5520104911 /dhcpv6/dhcpv6relay.go | |
parent | 2b05c7d03724d31529886d98f738499ac06ead7e (diff) | |
parent | a6212f1f72e94821a29894fb66656a981bd035d0 (diff) |
Merge branch 'master' into dhcpv4-moar-tests
Diffstat (limited to 'dhcpv6/dhcpv6relay.go')
-rw-r--r-- | dhcpv6/dhcpv6relay.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dhcpv6/dhcpv6relay.go b/dhcpv6/dhcpv6relay.go index 1bde354..d9555cb 100644 --- a/dhcpv6/dhcpv6relay.go +++ b/dhcpv6/dhcpv6relay.go @@ -173,7 +173,7 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) { if !ok { return nil, errors.New("Not a DHCPv6Relay") } - if relay.Type() != RELAY_FORW { + if relay.Type() != MessageTypeRelayForward { return nil, errors.New("The passed packet is not of type RELAY_FORW") } if msg == nil { @@ -185,7 +185,7 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) { for { linkAddr = append(linkAddr, relay.LinkAddr()) peerAddr = append(peerAddr, relay.PeerAddr()) - optiids = append(optiids, relay.GetOneOption(OPTION_INTERFACE_ID)) + optiids = append(optiids, relay.GetOneOption(OptionInterfaceID)) decap, err := DecapsulateRelay(relay) if err != nil { return nil, err @@ -197,7 +197,7 @@ func NewRelayReplFromRelayForw(relayForw, msg DHCPv6) (DHCPv6, error) { } } for i := len(linkAddr) - 1; i >= 0; i-- { - msg, err = EncapsulateRelay(msg, RELAY_REPL, linkAddr[i], peerAddr[i]) + msg, err = EncapsulateRelay(msg, MessageTypeRelayReply, linkAddr[i], peerAddr[i]) if opt := optiids[i]; opt != nil { msg.AddOption(opt) } |