Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e35941d authored by Jing Min Zhao's avatar Jing Min Zhao Committed by David S. Miller
Browse files

[NETFILTER]: Add H.323 conntrack/NAT helper

parent 30ca3e37
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ union ip_conntrack_expect_proto {
};

/* Add protocol helper include file here */
#include <linux/netfilter_ipv4/ip_conntrack_h323.h>
#include <linux/netfilter_ipv4/ip_conntrack_pptp.h>
#include <linux/netfilter_ipv4/ip_conntrack_amanda.h>
#include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
@@ -37,6 +38,7 @@ union ip_conntrack_expect_proto {
/* per conntrack: application helper private data */
union ip_conntrack_help {
	/* insert conntrack helper private data (master) here */
	struct ip_ct_h323_master ct_h323_info;
	struct ip_ct_pptp_master ct_pptp_info;
	struct ip_ct_ftp_master ct_ftp_info;
	struct ip_ct_irc_master ct_irc_info;
+30 −0
Original line number Diff line number Diff line
#ifndef _IP_CONNTRACK_H323_H
#define _IP_CONNTRACK_H323_H

#ifdef __KERNEL__

#define RAS_PORT 1719
#define Q931_PORT 1720
#define H323_RTP_CHANNEL_MAX 4	/* Audio, video, FAX and other */

/* This structure exists only once per master */
struct ip_ct_h323_master {

	/* Original and NATed Q.931 or H.245 signal ports */
	u_int16_t sig_port[IP_CT_DIR_MAX];

	/* Original and NATed RTP ports */
	u_int16_t rtp_port[H323_RTP_CHANNEL_MAX][IP_CT_DIR_MAX];

	union {
		/* RAS connection timeout */
		u_int32_t timeout;

		/* Next TPKT length (for separate TPKT header and data) */
		u_int16_t tpkt_len[IP_CT_DIR_MAX];
	};
};

#endif

#endif
+26 −0
Original line number Diff line number Diff line
@@ -168,6 +168,26 @@ config IP_NF_PPTP
	  If you want to compile it as a module, say M here and read
	  Documentation/modules.txt.  If unsure, say `N'.

config IP_NF_H323
	tristate  'H.323 protocol support'
	depends on IP_NF_CONNTRACK
	help
	  H.323 is a VoIP signalling protocol from ITU-T. As one of the most
	  important VoIP protocols, it is widely used by voice hardware and
	  software including voice gateways, IP phones, Netmeeting, OpenPhone,
	  Gnomemeeting, etc.

	  With this module you can support H.323 on a connection tracking/NAT
	  firewall.

	  This module supports RAS, Fast-start, H.245 tunnelling, RTP/RTCP
	  and T.120 based data and applications including audio, video, FAX,
	  chat, whiteboard, file transfer, etc. For more information, please
	  see http://nath323.sourceforge.net/.

	  If you want to compile it as a module, say 'M' here and read
	  Documentation/modules.txt.  If unsure, say 'N'.

config IP_NF_QUEUE
	tristate "IP Userspace queueing via NETLINK (OBSOLETE)"
	help
@@ -484,6 +504,12 @@ config IP_NF_NAT_PPTP
	default IP_NF_NAT if IP_NF_PPTP=y
	default m if IP_NF_PPTP=m

config IP_NF_NAT_H323
	tristate
	depends on IP_NF_IPTABLES!=n && IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
	default IP_NF_NAT if IP_NF_H323=y
	default m if IP_NF_H323=m

# mangle + specific targets
config IP_NF_MANGLE
	tristate "Packet mangling"
+5 −0
Original line number Diff line number Diff line
@@ -10,6 +10,9 @@ iptable_nat-objs := ip_nat_rule.o ip_nat_standalone.o
ip_conntrack_pptp-objs	:= ip_conntrack_helper_pptp.o ip_conntrack_proto_gre.o
ip_nat_pptp-objs	:= ip_nat_helper_pptp.o ip_nat_proto_gre.o

ip_conntrack_h323-objs := ip_conntrack_helper_h323.o ip_conntrack_helper_h323_asn1.o
ip_nat_h323-objs := ip_nat_helper_h323.o

# connection tracking
obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
obj-$(CONFIG_IP_NF_NAT) += ip_nat.o
@@ -22,6 +25,7 @@ obj-$(CONFIG_IP_NF_CONNTRACK_NETLINK) += ip_conntrack_netlink.o
obj-$(CONFIG_IP_NF_CT_PROTO_SCTP) += ip_conntrack_proto_sctp.o

# connection tracking helpers
obj-$(CONFIG_IP_NF_H323) += ip_conntrack_h323.o
obj-$(CONFIG_IP_NF_PPTP) += ip_conntrack_pptp.o
obj-$(CONFIG_IP_NF_AMANDA) += ip_conntrack_amanda.o
obj-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp.o
@@ -30,6 +34,7 @@ obj-$(CONFIG_IP_NF_IRC) += ip_conntrack_irc.o
obj-$(CONFIG_IP_NF_NETBIOS_NS) += ip_conntrack_netbios_ns.o

# NAT helpers 
obj-$(CONFIG_IP_NF_NAT_H323) += ip_nat_h323.o
obj-$(CONFIG_IP_NF_NAT_PPTP) += ip_nat_pptp.o
obj-$(CONFIG_IP_NF_NAT_AMANDA) += ip_nat_amanda.o
obj-$(CONFIG_IP_NF_NAT_TFTP) += ip_nat_tftp.o
+1731 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading