Changeset 10794 in hybrid for branches/releng-9.0


Ignore:
Timestamp:
May 12, 2012, 4:30:11 PM (13 years ago)
Author:
rick
Message:

Houdt rekening met clients die af-en-toe disconnecten, je ziet hiervan
tijdelijk geen MAC.

Related-To: nodefactory:ticket:161

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/usr/local/www/wlportal/index.cgi

    r10725 r10794  
    151151        # MAC is whitelisted
    152152        continue
    153       elif stored_mac.has_key(ip) and active_mac[ip] == stored_mac[ip]:
    154         # previous record found
    155         # Stored v.s. Active happy
     153      elif not active_mac.has_key(ip) and stored_mac.has_key(ip):
     154        # In-active connection - Keep entry with normal expire time, as user
     155        # might come back (temponary disconnect).
     156        continue
     157      elif active_mac.has_key(ip) and stored_mac.has_key(ip) and active_mac[ip] == stored_mac[ip]:
     158        # Active connection - previous record found - Stored v.s. Active happy
    156159        continue
    157160      else:
    158161        self.delete(ip)
    159         deleted_entries =+ 1
     162        deleted_entries =+ 1
    160163    return deleted_entries
    161164     
Note: See TracChangeset for help on using the changeset viewer.