summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1999-06-22 11:23:30 +0000
committerbrian <brian@cvs.openbsd.org>1999-06-22 11:23:30 +0000
commit8a4aba9425e9b35a5f8c543501e610919512c0ce (patch)
tree03d57a57b281110c246a12b9d7d0b102aa6973cf /usr.sbin
parent1f56b84ea435a903043948f2275c9ea9136a3ab5 (diff)
Fix the unused REVERSE stuff in the packet aliasing code.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/alias.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/alias.c b/usr.sbin/ppp/ppp/alias.c
index 10e0ccc3164..8b18a73af14 100644
--- a/usr.sbin/ppp/ppp/alias.c
+++ b/usr.sbin/ppp/ppp/alias.c
@@ -1174,8 +1174,12 @@ PacketAliasIn(char *ptr, int maxpacketsize)
struct ip *pip;
int iresult;
- if (packetAliasMode & PKT_ALIAS_REVERSE)
- return PacketAliasOut(ptr, maxpacketsize);
+ if (packetAliasMode & PKT_ALIAS_REVERSE) {
+ packetAliasMode &= ~PKT_ALIAS_REVERSE;
+ iresult = PacketAliasOut(ptr, maxpacketsize);
+ packetAliasMode |= PKT_ALIAS_REVERSE;
+ return iresult;
+ }
HouseKeeping();
ClearCheckNewLink();
@@ -1256,8 +1260,12 @@ PacketAliasOut(char *ptr, /* valid IP packet */
struct in_addr addr_save;
struct ip *pip;
- if (packetAliasMode & PKT_ALIAS_REVERSE)
- return PacketAliasIn(ptr, maxpacketsize);
+ if (packetAliasMode & PKT_ALIAS_REVERSE) {
+ packetAliasMode &= ~PKT_ALIAS_REVERSE;
+ iresult = PacketAliasIn(ptr, maxpacketsize);
+ packetAliasMode |= PKT_ALIAS_REVERSE;
+ return iresult;
+ }
HouseKeeping();
ClearCheckNewLink();