diff --git a/lib/libalias/alias.c b/lib/libalias/alias.c index e02957fcfe12..42ce618a83a6 100644 --- a/lib/libalias/alias.c +++ b/lib/libalias/alias.c @@ -884,6 +884,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) /* Restore original IP address */ accumulate = twowords(&pip->ip_dst); + pip->ip_dst = original_address; accumulate -= twowords(&pip->ip_dst); /* If this is a transparent proxy packet, then modify the source diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c index e02957fcfe12..42ce618a83a6 100644 --- a/sys/netinet/libalias/alias.c +++ b/sys/netinet/libalias/alias.c @@ -884,6 +884,7 @@ TcpAliasIn(struct libalias *la, struct ip *pip) /* Restore original IP address */ accumulate = twowords(&pip->ip_dst); + pip->ip_dst = original_address; accumulate -= twowords(&pip->ip_dst); /* If this is a transparent proxy packet, then modify the source