summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/command.c2
-rw-r--r--usr.sbin/ppp/nat_cmd.c23
-rw-r--r--usr.sbin/ppp/nat_cmd.h1
-rw-r--r--usr.sbin/ppp/ppp.8.m48
4 files changed, 34 insertions, 0 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index d05471c..635b197 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -773,6 +773,8 @@ static struct cmdtab const NatCommands[] =
{"punch_fw", NULL, nat_PunchFW, LOCAL_AUTH,
"firewall control", "nat punch_fw [base count]"},
#endif
+ {"skinny_port", NULL, nat_SkinnyPort, LOCAL_AUTH,
+ "TCP port used by Skinny Station protocol", "nat skinny_port [port]"},
{"same_ports", NULL, NatOption, LOCAL_AUTH,
"try to leave port numbers unchanged", "nat same_ports yes|no",
(const void *) PKT_ALIAS_SAME_PORTS},
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)
diff --git a/usr.sbin/ppp/nat_cmd.h b/usr.sbin/ppp/nat_cmd.h
index c70afb0..f4c3655 100644
--- a/usr.sbin/ppp/nat_cmd.h
+++ b/usr.sbin/ppp/nat_cmd.h
@@ -37,5 +37,6 @@ extern int nat_SetTarget(struct cmdargs const *);
#ifndef NO_FW_PUNCH
extern int nat_PunchFW(struct cmdargs const *);
#endif
+extern int nat_SkinnyPort(struct cmdargs const *);
extern struct layer natlayer;
diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4
index e58b4a4..a3de3bf 100644
--- a/usr.sbin/ppp/ppp.8.m4
+++ b/usr.sbin/ppp/ppp.8.m4
@@ -3470,6 +3470,14 @@ The range will be cleared when the
command is run.
.Pp
If no arguments are given, firewall punching is disabled.
+.It nat skinny_port Op Ar port
+This command tells
+.Nm
+which TCP port is used by the Skinny Station protocol. Skinny is used by
+Cisco IP phones to communicate with Cisco Call Managers to setup voice
+over IP calls. The typical port used by Skinny is 2000.
+.Pp
+If no argument is given, skinny aliasing is disabled.
.It nat same_ports yes|no
When enabled, this command will tell the network address translation engine to
attempt to avoid changing the port number on outgoing packets.
OpenPOWER on IntegriCloud