summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6/dhcpv6message.go
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2017-12-07 00:10:05 +0000
committerAndrea Barberio <insomniac@slackware.it>2017-12-07 00:10:05 +0000
commitf5d849e1e72d2b92136eadc66a82cad83f8bac91 (patch)
tree4980eebf315548abee44151125936f8d31bdbce6 /dhcpv6/dhcpv6message.go
parent13f86883b764b61a15bbcd2914d09541572866ee (diff)
Relay message options instead of a raw byte sequence
Diffstat (limited to 'dhcpv6/dhcpv6message.go')
-rw-r--r--dhcpv6/dhcpv6message.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/dhcpv6/dhcpv6message.go b/dhcpv6/dhcpv6message.go
index 4461c50..f1ba601 100644
--- a/dhcpv6/dhcpv6message.go
+++ b/dhcpv6/dhcpv6message.go
@@ -106,9 +106,14 @@ func (d *DHCPv6Message) Type() MessageType {
}
func (d *DHCPv6Message) SetMessage(messageType MessageType) {
- if d.MessageTypeToString() == "" {
+ msgString := MessageTypeToString(messageType)
+ if msgString == "" {
log.Printf("Warning: unknown DHCPv6 message type: %v", messageType)
}
+ if messageType == RELAY_FORW || messageType == RELAY_REPL {
+ log.Printf("Warning: using a RELAY message type with a non-relay message: %v (%v)",
+ msgString, messageType)
+ }
d.messageType = messageType
}