Restore previous version of FindLinkIn().
Instead, natd(8) should be fixed to call PacketAliasSetAddress() as part of initialization, as required by libalias(3).
This commit is contained in:
parent
6b0e02e513
commit
f3baa77e5e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51506
@ -1106,6 +1106,14 @@ FindLinkIn(struct in_addr dst_addr,
|
||||
if (dst_port == 0)
|
||||
flags_in |= LINK_UNKNOWN_DEST_PORT;
|
||||
|
||||
/* The following allows permanent links to be
|
||||
be specified as using the default aliasing address
|
||||
(i.e. device interface address) without knowing
|
||||
in advance what that address is. */
|
||||
|
||||
if (alias_addr.s_addr == aliasAddress.s_addr)
|
||||
alias_addr.s_addr = 0;
|
||||
|
||||
/* Search loop */
|
||||
start_point = StartPointIn(alias_addr, alias_port, link_type);
|
||||
link = linkTableIn[start_point];
|
||||
@ -1196,15 +1204,6 @@ FindLinkIn(struct in_addr dst_addr,
|
||||
link_type)
|
||||
: link_unknown_all;
|
||||
}
|
||||
/* The following allows permanent links to be
|
||||
be specified as using the default aliasing address
|
||||
(i.e. device interface address) without knowing
|
||||
in advance what that address is. */
|
||||
else if (alias_addr.s_addr != 0 && alias_addr.s_addr == aliasAddress.s_addr)
|
||||
{
|
||||
return FindLinkIn(dst_addr, nullAddress, dst_port, alias_port,
|
||||
link_type, replace_partial_links);
|
||||
}
|
||||
else
|
||||
{
|
||||
return(NULL);
|
||||
|
@ -1106,6 +1106,14 @@ FindLinkIn(struct in_addr dst_addr,
|
||||
if (dst_port == 0)
|
||||
flags_in |= LINK_UNKNOWN_DEST_PORT;
|
||||
|
||||
/* The following allows permanent links to be
|
||||
be specified as using the default aliasing address
|
||||
(i.e. device interface address) without knowing
|
||||
in advance what that address is. */
|
||||
|
||||
if (alias_addr.s_addr == aliasAddress.s_addr)
|
||||
alias_addr.s_addr = 0;
|
||||
|
||||
/* Search loop */
|
||||
start_point = StartPointIn(alias_addr, alias_port, link_type);
|
||||
link = linkTableIn[start_point];
|
||||
@ -1196,15 +1204,6 @@ FindLinkIn(struct in_addr dst_addr,
|
||||
link_type)
|
||||
: link_unknown_all;
|
||||
}
|
||||
/* The following allows permanent links to be
|
||||
be specified as using the default aliasing address
|
||||
(i.e. device interface address) without knowing
|
||||
in advance what that address is. */
|
||||
else if (alias_addr.s_addr != 0 && alias_addr.s_addr == aliasAddress.s_addr)
|
||||
{
|
||||
return FindLinkIn(dst_addr, nullAddress, dst_port, alias_port,
|
||||
link_type, replace_partial_links);
|
||||
}
|
||||
else
|
||||
{
|
||||
return(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user