1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-21 02:48:46 +00:00

Make this work with the new alias library since, evidently, we're

not providing the backwards-compatability routines in libalias anymore
(which I think may have been a mistake).
This commit is contained in:
Jordan K. Hubbard 1999-02-27 22:37:38 +00:00
parent b49f17156f
commit f627793d19
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44320
2 changed files with 12 additions and 8 deletions

View File

@ -9,7 +9,7 @@
* *
* Ari Suutari <suutari@iki.fi> * Ari Suutari <suutari@iki.fi>
* *
* $Id$ * $Id: natd.c,v 1.8 1997/12/27 19:31:11 alex Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@ -699,7 +699,7 @@ static void SetAliasAddressFromIfName (char* ifName)
Quit ("Cannot get interface address."); Quit ("Cannot get interface address.");
addr = (struct sockaddr_in*) &req.ifr_addr; addr = (struct sockaddr_in*) &req.ifr_addr;
SetPacketAliasAddress (addr->sin_addr); PacketAliasSetAddress (addr->sin_addr);
syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes", syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes",
inet_ntoa (addr->sin_addr), inet_ntoa (addr->sin_addr),
ifMTU); ifMTU);
@ -1160,6 +1160,7 @@ void SetupPermanentLink (char* parms)
char* ptr; char* ptr;
struct in_addr srcAddr; struct in_addr srcAddr;
struct in_addr dstAddr; struct in_addr dstAddr;
struct in_addr null_address;
u_short srcPort; u_short srcPort;
u_short dstPort; u_short dstPort;
u_short aliasPort; u_short aliasPort;
@ -1200,11 +1201,12 @@ void SetupPermanentLink (char* parms)
aliasPort = StrToPort (ptr, protoName); aliasPort = StrToPort (ptr, protoName);
PacketAliasPermanentLink (srcAddr, null_address.s_addr = 0;
PacketAliasRedirectPort (srcAddr,
srcPort, srcPort,
dstAddr, dstAddr,
dstPort, dstPort,
aliasPort, null_address, aliasPort,
proto); proto);
} }

View File

@ -9,7 +9,7 @@
* *
* Ari Suutari <suutari@iki.fi> * Ari Suutari <suutari@iki.fi>
* *
* $Id$ * $Id: natd.c,v 1.8 1997/12/27 19:31:11 alex Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@ -699,7 +699,7 @@ static void SetAliasAddressFromIfName (char* ifName)
Quit ("Cannot get interface address."); Quit ("Cannot get interface address.");
addr = (struct sockaddr_in*) &req.ifr_addr; addr = (struct sockaddr_in*) &req.ifr_addr;
SetPacketAliasAddress (addr->sin_addr); PacketAliasSetAddress (addr->sin_addr);
syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes", syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes",
inet_ntoa (addr->sin_addr), inet_ntoa (addr->sin_addr),
ifMTU); ifMTU);
@ -1160,6 +1160,7 @@ void SetupPermanentLink (char* parms)
char* ptr; char* ptr;
struct in_addr srcAddr; struct in_addr srcAddr;
struct in_addr dstAddr; struct in_addr dstAddr;
struct in_addr null_address;
u_short srcPort; u_short srcPort;
u_short dstPort; u_short dstPort;
u_short aliasPort; u_short aliasPort;
@ -1200,11 +1201,12 @@ void SetupPermanentLink (char* parms)
aliasPort = StrToPort (ptr, protoName); aliasPort = StrToPort (ptr, protoName);
PacketAliasPermanentLink (srcAddr, null_address.s_addr = 0;
PacketAliasRedirectPort (srcAddr,
srcPort, srcPort,
dstAddr, dstAddr,
dstPort, dstPort,
aliasPort, null_address, aliasPort,
proto); proto);
} }