1) in CleanupAliasData, don't nullify entry in linkTableOut

since there might be permanent entries still left after
   calls to DeleteLink (it will be nullified by DeleteLink
   if all entries are deleted, won't it ?)

2) in PacketAliasSetAddress, set the aliasing address
   even when PKT_ALIAS_RESET_ON_ADDR_CHANGE is in effect.
   Just don't clean up links in this case.

Submitted by: Ari Suutari <ari@suutari.iki.fi>
         via: Charles Mott <cmott@srv.net>
PR: 5041
This commit is contained in:
Brian Somers 1998-02-27 23:07:07 +00:00
parent 897e6eb1f4
commit 0ffaca1078
2 changed files with 4 additions and 8 deletions

View File

@ -677,7 +677,6 @@ CleanupAliasData(void)
for (i=0; i<LINK_TABLE_OUT_SIZE; i++)
{
link = linkTableOut[i];
linkTableOut[i] = NULL;
while (link != NULL)
{
struct alias_link *link_next;
@ -1940,10 +1939,9 @@ PacketAliasSetAddress(struct in_addr addr)
{
if (packetAliasMode & PKT_ALIAS_RESET_ON_ADDR_CHANGE
&& aliasAddress.s_addr != addr.s_addr)
{
CleanupAliasData();
aliasAddress = addr;
}
aliasAddress = addr;
}

View File

@ -677,7 +677,6 @@ CleanupAliasData(void)
for (i=0; i<LINK_TABLE_OUT_SIZE; i++)
{
link = linkTableOut[i];
linkTableOut[i] = NULL;
while (link != NULL)
{
struct alias_link *link_next;
@ -1940,10 +1939,9 @@ PacketAliasSetAddress(struct in_addr addr)
{
if (packetAliasMode & PKT_ALIAS_RESET_ON_ADDR_CHANGE
&& aliasAddress.s_addr != addr.s_addr)
{
CleanupAliasData();
aliasAddress = addr;
}
aliasAddress = addr;
}