summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>1999-09-21 14:44:32 +0000
committerru <ru@FreeBSD.org>1999-09-21 14:44:32 +0000
commitad9a3de54d464a5a4b5cdcdce8a9b72cb0c7e5fe (patch)
treeaad85eb6cb79bcef4bc24fcff648717fa0bc2526 /sys
parentea4af6448d890be569fb18bf4b3eaaf57af5e6dc (diff)
downloadFreeBSD-src-ad9a3de54d464a5a4b5cdcdce8a9b72cb0c7e5fe.zip
FreeBSD-src-ad9a3de54d464a5a4b5cdcdce8a9b72cb0c7e5fe.tar.gz
Restore previous version of FindLinkIn().
Instead, natd(8) should be fixed to call PacketAliasSetAddress() as part of initialization, as required by libalias(3).
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/libalias/alias_db.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c
index 89bcc54..4ac9f43 100644
--- a/sys/netinet/libalias/alias_db.c
+++ b/sys/netinet/libalias/alias_db.c
@@ -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);
OpenPOWER on IntegriCloud