summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-06-13 21:54:01 +0000
committerru <ru@FreeBSD.org>2003-06-13 21:54:01 +0000
commit95a96dcf7660df798f8f692c4f35a3d0afa2d788 (patch)
tree57bd8d398c6e773bb9eee9475b684d19da3e1fa4
parent0d2c955d09d34c5776d539b2f79b5668504201a5 (diff)
downloadFreeBSD-src-95a96dcf7660df798f8f692c4f35a3d0afa2d788.zip
FreeBSD-src-95a96dcf7660df798f8f692c4f35a3d0afa2d788.tar.gz
In the PKT_ALIAS_PROXY_ONLY mode, make sure to preserve the
original source IP address, as promised in the manual page. Spotted by: Vaclav Petricek
-rw-r--r--lib/libalias/alias.c4
-rw-r--r--sys/netinet/libalias/alias.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalias/alias.c b/lib/libalias/alias.c
index 467f371..54839ff 100644
--- a/lib/libalias/alias.c
+++ b/lib/libalias/alias.c
@@ -1425,6 +1425,10 @@ PacketAliasOut(char *ptr, /* valid IP packet */
SetDefaultAliasAddress(pip->ip_src);
}
}
+ else if (packetAliasMode & PKT_ALIAS_PROXY_ONLY)
+ {
+ SetDefaultAliasAddress(pip->ip_src);
+ }
iresult = PKT_ALIAS_IGNORED;
if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0)
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 467f371..54839ff 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -1425,6 +1425,10 @@ PacketAliasOut(char *ptr, /* valid IP packet */
SetDefaultAliasAddress(pip->ip_src);
}
}
+ else if (packetAliasMode & PKT_ALIAS_PROXY_ONLY)
+ {
+ SetDefaultAliasAddress(pip->ip_src);
+ }
iresult = PKT_ALIAS_IGNORED;
if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0)
OpenPOWER on IntegriCloud