summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp')
-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();