From f627793d190bd7015759fb5e182e1f7cbccaa4e4 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Sat, 27 Feb 1999 22:37:38 +0000 Subject: [PATCH] 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). --- sbin/natd/natd.c | 10 ++++++---- usr.sbin/natd/natd.c | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 3646a3322c15..7b9ac6f899d9 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -9,7 +9,7 @@ * * Ari Suutari * - * $Id$ + * $Id: natd.c,v 1.8 1997/12/27 19:31:11 alex Exp $ */ #include @@ -699,7 +699,7 @@ static void SetAliasAddressFromIfName (char* ifName) Quit ("Cannot get interface address."); addr = (struct sockaddr_in*) &req.ifr_addr; - SetPacketAliasAddress (addr->sin_addr); + PacketAliasSetAddress (addr->sin_addr); syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes", inet_ntoa (addr->sin_addr), ifMTU); @@ -1160,6 +1160,7 @@ void SetupPermanentLink (char* parms) char* ptr; struct in_addr srcAddr; struct in_addr dstAddr; + struct in_addr null_address; u_short srcPort; u_short dstPort; u_short aliasPort; @@ -1200,11 +1201,12 @@ void SetupPermanentLink (char* parms) aliasPort = StrToPort (ptr, protoName); - PacketAliasPermanentLink (srcAddr, + null_address.s_addr = 0; + PacketAliasRedirectPort (srcAddr, srcPort, dstAddr, dstPort, - aliasPort, + null_address, aliasPort, proto); } diff --git a/usr.sbin/natd/natd.c b/usr.sbin/natd/natd.c index 3646a3322c15..7b9ac6f899d9 100644 --- a/usr.sbin/natd/natd.c +++ b/usr.sbin/natd/natd.c @@ -9,7 +9,7 @@ * * Ari Suutari * - * $Id$ + * $Id: natd.c,v 1.8 1997/12/27 19:31:11 alex Exp $ */ #include @@ -699,7 +699,7 @@ static void SetAliasAddressFromIfName (char* ifName) Quit ("Cannot get interface address."); addr = (struct sockaddr_in*) &req.ifr_addr; - SetPacketAliasAddress (addr->sin_addr); + PacketAliasSetAddress (addr->sin_addr); syslog (LOG_INFO, "Aliasing to %s, mtu %d bytes", inet_ntoa (addr->sin_addr), ifMTU); @@ -1160,6 +1160,7 @@ void SetupPermanentLink (char* parms) char* ptr; struct in_addr srcAddr; struct in_addr dstAddr; + struct in_addr null_address; u_short srcPort; u_short dstPort; u_short aliasPort; @@ -1200,11 +1201,12 @@ void SetupPermanentLink (char* parms) aliasPort = StrToPort (ptr, protoName); - PacketAliasPermanentLink (srcAddr, + null_address.s_addr = 0; + PacketAliasRedirectPort (srcAddr, srcPort, dstAddr, dstPort, - aliasPort, + null_address, aliasPort, proto); }