Changeset 2982 for trunk/packages


Ignore:
Timestamp:
Feb 1, 2010, 6:56:09 PM (15 years ago)
Author:
quentin
Message:

Don't answer DHCP packets if we don't recognize the hardware address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dhcp/invirt-dhcpserver

    r2491 r2982  
    225225        else : s.syslog(s.LOG_INFO,"Get DHCPREQUEST_UNKNOWN_STATE packet : not implemented")
    226226
    227         if self.backend.Request(packet) : packet.TransformToDhcpAckPacket()
    228         else : packet.TransformToDhcpNackPacket()
    229 
    230         self.SendPacket(packet)
    231 
    232 
     227        if self.backend.Request(packet):
     228            packet.TransformToDhcpAckPacket()
     229            self.SendPacket(packet)
     230        elif self.backend.Discover(packet):
     231            packet.TransformToDhcpNackPacket()
     232            self.SendPacket(packet)
     233        else:
     234            pass # We aren't authoritative, so don't reply if we don't know them.
    233235
    234236    # FIXME: These are not yet implemented.
Note: See TracChangeset for help on using the changeset viewer.