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:
parent
897e6eb1f4
commit
0ffaca1078
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33897
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user