summaryrefslogtreecommitdiffstats
path: root/sys/netinet/libalias/alias.c
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-09-23 07:41:55 +0000
committermarcus <marcus@FreeBSD.org>2003-09-23 07:41:55 +0000
commite19a1e64d248ad6f10230273b0afcd49b570e0ba (patch)
treedcae4425b97cd670a26f1074a999df062d47d4e1 /sys/netinet/libalias/alias.c
parent1adbd0035e01b5e125de7222da250f6c0cb4634a (diff)
downloadFreeBSD-src-e19a1e64d248ad6f10230273b0afcd49b570e0ba.zip
FreeBSD-src-e19a1e64d248ad6f10230273b0afcd49b570e0ba.tar.gz
Add Cisco Skinny Station protocol support to libalias, natd, and ppp.
Skinny is the protocol used by Cisco IP phones to talk to Cisco Call Managers. With this code, one can use a Cisco IP phone behind a FreeBSD NAT gateway. Currently, having the Call Manager behind the NAT gateway is not supported. More information on enabling Skinny support in libalias, natd, and ppp can be found in those applications' manpages. PR: 55843 Reviewed by: ru Approved by: ru MFC after: 30 days
Diffstat (limited to 'sys/netinet/libalias/alias.c')
-rw-r--r--sys/netinet/libalias/alias.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 54839ff..cf93a74 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -917,6 +917,9 @@ TcpAliasIn(struct ip *pip)
if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER
|| ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER)
AliasHandlePptpIn(pip, link);
+ else if (skinnyPort != 0 && (ntohs(tc->th_dport) == skinnyPort
+ || ntohs(tc->th_sport) == skinnyPort))
+ AliasHandleSkinny(pip, link);
alias_address = GetAliasAddress(link);
original_address = GetOriginalAddress(link);
@@ -1098,6 +1101,9 @@ TcpAliasOut(struct ip *pip, int maxpacketsize)
else if (ntohs(tc->th_dport) == PPTP_CONTROL_PORT_NUMBER
|| ntohs(tc->th_sport) == PPTP_CONTROL_PORT_NUMBER)
AliasHandlePptpOut(pip, link);
+ else if (skinnyPort != 0 && (ntohs(tc->th_sport) == skinnyPort
+ || ntohs(tc->th_dport) == skinnyPort))
+ AliasHandleSkinny(pip, link);
/* Adjust TCP checksum since source port is being aliased */
/* and source address is being altered */
OpenPOWER on IntegriCloud