Fixed &read_expire for subnet-indexed tables

This commit is contained in:
Jan Grashoefer 2016-03-17 19:56:25 +01:00
parent a5f4e8aafe
commit d5034ccc19

View file

@ -1787,7 +1787,18 @@ Val* TableVal::Lookup(Val* index, bool use_default_val)
{
TableEntryVal* v = (TableEntryVal*) subnets->Lookup(index);
if ( v )
{
if ( attrs &&
! (attrs->FindAttr(ATTR_EXPIRE_WRITE) ||
attrs->FindAttr(ATTR_EXPIRE_CREATE)) )
{
v->SetExpireAccess(network_time);
if ( LoggingAccess() && expire_time )
ReadOperation(index, v);
}
return v->Value() ? v->Value() : this;
}
if ( ! use_default_val )
return 0;