Skip to content

Commit

Permalink
Handle multi-value dhcplb.Packet6.Type() #5
Browse files Browse the repository at this point in the history
Summary:
Merging #5
Doing it myself because Bill hasn't signed the CLA yet and I want this out now :)

Reviewed By: insomniacslk

Differential Revision: D3862374

fbshipit-source-id: 2d38edbca205bda1d7210dddba5fbef0fa6978df
  • Loading branch information
pallotron authored and Facebook Github Bot 5 committed Sep 14, 2016
1 parent f850618 commit 3ebdd0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion glog_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package main

import (
"fmt"

"github.com/facebookincubator/dhcplb/lib"
"github.com/golang/glog"
"github.com/krolaw/dhcp4"
Expand Down Expand Up @@ -51,7 +52,8 @@ func (l glogLogger) Log(msg dhcplb.LogMessage) error {
sample["client_mac"] = packet.CHAddr().String()
} else if msg.Version == 6 {
packet := dhcplb.Packet6(msg.Packet)
sample["type"] = packet.Type().String()
pt, _ := packet.Type()
sample["type"] = pt.String()
xid, _ := packet.XID()
sample["xid"] = fmt.Sprintf("%#06x", xid)
duid, _ := packet.Duid()
Expand Down

0 comments on commit 3ebdd0f

Please sign in to comment.