summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/nat_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/nat_cmd.c')
-rw-r--r--usr.sbin/ppp/nat_cmd.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c
index deb9932..8172fd6 100644
--- a/usr.sbin/ppp/nat_cmd.c
+++ b/usr.sbin/ppp/nat_cmd.c
@@ -470,6 +470,29 @@ nat_PunchFW(struct cmdargs const *arg)
}
#endif
+int
+nat_SkinnyPort(struct cmdargs const *arg)
+{
+ char *end;
+ long port;
+
+ if (arg->argc == arg->argn) {
+ PacketAliasSetSkinnyPort(0);
+ return 0;
+ }
+
+ if (arg->argc != arg->argn + 1)
+ return -1;
+
+ port = strtol(arg->argv[arg->argn], &end, 10);
+ if (*end != '\0' || port < 0)
+ return -1;
+
+ PacketAliasSetSkinnyPort(port);
+
+ return 0;
+}
+
static struct mbuf *
nat_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp,
int pri, u_short *proto)
OpenPOWER on IntegriCloud