Skip to content

Commit

Permalink
Fix usage of net.IP as pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Jan 5, 2020
1 parent 6e41972 commit dec2506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion protocols/ospf/packetv3/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type deserializableIP struct {
}

func (ip deserializableIP) ToNetIP() net.IP {
return *(net.IPv6(ip.Higher, ip.Lower))
return net.IPv6(ip.Higher, ip.Lower)
}

func serializeIPv6(ip net.IP, buf *bytes.Buffer) {
Expand Down
2 changes: 1 addition & 1 deletion protocols/ospf/packetv3/lsa_prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func DeserializeLSAPrefix(buf *bytes.Buffer) (LSAPrefix, int, error) {
if err != nil {
return pdu, readBytes, errors.Wrap(err, "unable to decode AddressPrefix")
}
pdu.Address = *addr
pdu.Address = addr
readBytes += len(pfxBytes)

return pdu, readBytes, nil
Expand Down

0 comments on commit dec2506

Please sign in to comment.