summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2017-12-06 23:11:30 +0000
committerAndrea Barberio <insomniac@slackware.it>2017-12-06 23:11:30 +0000
commit13f86883b764b61a15bbcd2914d09541572866ee (patch)
treea9abcb0934ae61d9b87c7805e12109ac537b9636 /dhcpv6
parent3874bd73f93d2abdfba04aa5821d62c37acd1f2f (diff)
Added raw payload processing for DHCPv6Relay
Diffstat (limited to 'dhcpv6')
-rw-r--r--dhcpv6/dhcpv6.go1
-rw-r--r--dhcpv6/dhcpv6relay.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/dhcpv6/dhcpv6.go b/dhcpv6/dhcpv6.go
index 7667821..621cc73 100644
--- a/dhcpv6/dhcpv6.go
+++ b/dhcpv6/dhcpv6.go
@@ -34,6 +34,7 @@ func FromBytes(data []byte) (DHCPv6, error) {
hopCount: uint8(data[1]),
linkAddr: append(data[2:18]),
peerAddr: append(data[18:34]),
+ payload: append(data[34:]),
}
return &d, nil
} else {
diff --git a/dhcpv6/dhcpv6relay.go b/dhcpv6/dhcpv6relay.go
index 25cf658..8fa1c4e 100644
--- a/dhcpv6/dhcpv6relay.go
+++ b/dhcpv6/dhcpv6relay.go
@@ -29,11 +29,13 @@ func (r *DHCPv6Relay) Summary() string {
" messageType=%v\n"+
" hopcount=%v\n"+
" linkaddr=%v\n"+
- " peeraddr=%v\n",
+ " peeraddr=%v\n"+
+ " payload=%v\n",
r.MessageTypeToString(),
r.hopCount,
r.linkAddr,
r.peerAddr,
+ r.payload,
)
return ret
}