This commit is contained in:
Simon Zolin 2020-04-30 13:35:45 +03:00
parent c47577b015
commit 4405b619d3

View file

@ -202,7 +202,7 @@ func (s *V6Server) packetHandler(conn net.PacketConn, peer net.Addr, req dhcpv6.
dhcpv6.MessageTypeRebind:
if sid != nil {
log.Debug("DHCPv6: drop packet: ServerID option in message %s", msg.Type().String)
log.Debug("DHCPv6: drop packet: ServerID option in message %s", msg.Type().String())
return
}
@ -212,12 +212,12 @@ func (s *V6Server) packetHandler(conn net.PacketConn, peer net.Addr, req dhcpv6.
dhcpv6.MessageTypeDecline:
if sid == nil {
log.Debug("DHCPv6: drop packet: no ServerID option in message %s", msg.Type().String)
log.Debug("DHCPv6: drop packet: no ServerID option in message %s", msg.Type().String())
return
}
if !sid.Equal(s.conf.sid) {
log.Debug("DHCPv6: drop packet: mismatched ServerID option in message %s: %s",
msg.Type().String, sid.String())
msg.Type().String(), sid.String())
return
}
}