1 diff -urN linux-2.4.32/net/ipv4/netfilter/Config.in linux-2.4.32.new/net/ipv4/netfilter/Config.in
2 --- linux-2.4.32/net/ipv4/netfilter/Config.in 2006-03-01 00:53:57.884792456 +0100
3 +++ linux-2.4.32.new/net/ipv4/netfilter/Config.in 2006-03-01 00:55:14.462150928 +0100
5 dep_tristate ' GRE protocol support' CONFIG_IP_NF_CT_PROTO_GRE $CONFIG_IP_NF_CONNTRACK
6 dep_tristate ' PPTP protocol support' CONFIG_IP_NF_PPTP $CONFIG_IP_NF_CT_PROTO_GRE
7 dep_tristate ' H.323 (netmeeting) support' CONFIG_IP_NF_H323 $CONFIG_IP_NF_CONNTRACK
8 + dep_tristate ' RTSP protocol support' CONFIG_IP_NF_RTSP $CONFIG_IP_NF_CONNTRACK
11 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
13 define_tristate CONFIG_IP_NF_NAT_H323 $CONFIG_IP_NF_NAT
16 + if [ "$CONFIG_IP_NF_RTSP" = "m" ]; then
17 + define_tristate CONFIG_IP_NF_NAT_RTSP m
19 + if [ "$CONFIG_IP_NF_RTSP" = "y" ]; then
20 + define_tristate CONFIG_IP_NF_NAT_RTSP $CONFIG_IP_NF_NAT
23 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
24 dep_tristate ' Basic SNMP-ALG support (EXPERIMENTAL)' CONFIG_IP_NF_NAT_SNMP_BASIC $CONFIG_IP_NF_NAT
26 diff -urN linux-2.4.32/net/ipv4/netfilter/Makefile linux-2.4.32.new/net/ipv4/netfilter/Makefile
27 --- linux-2.4.32/net/ipv4/netfilter/Makefile 2006-03-01 00:53:57.886792152 +0100
28 +++ linux-2.4.32.new/net/ipv4/netfilter/Makefile 2006-03-01 00:55:14.463150776 +0100
30 ifdef CONFIG_IP_NF_NAT_H323
31 export-objs += ip_conntrack_h323.o
33 +obj-$(CONFIG_IP_NF_RTSP) += ip_conntrack_rtsp.o
34 +ifdef CONFIG_IP_NF_NAT_RTSP
35 + export-objs += ip_conntrack_rtsp.o
42 obj-$(CONFIG_IP_NF_NAT_PROTO_GRE) += ip_nat_proto_gre.o
43 obj-$(CONFIG_IP_NF_NAT_PPTP) += ip_nat_pptp.o
44 obj-$(CONFIG_IP_NF_NAT_H323) += ip_nat_h323.o
45 +obj-$(CONFIG_IP_NF_NAT_RTSP) += ip_nat_rtsp.o
48 obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
49 diff -urN linux-2.4.32/net/ipv4/netfilter/ip_conntrack_rtsp.c linux-2.4.32.new/net/ipv4/netfilter/ip_conntrack_rtsp.c
50 --- linux-2.4.32/net/ipv4/netfilter/ip_conntrack_rtsp.c 1970-01-01 01:00:00.000000000 +0100
51 +++ linux-2.4.32.new/net/ipv4/netfilter/ip_conntrack_rtsp.c 2006-03-01 00:55:14.465150472 +0100
54 + * RTSP extension for IP connection tracking
55 + * (C) 2003 by Tom Marshall <tmarshall@real.com>
56 + * based on ip_conntrack_irc.c
58 + * This program is free software; you can redistribute it and/or
59 + * modify it under the terms of the GNU General Public License
60 + * as published by the Free Software Foundation; either version
61 + * 2 of the License, or (at your option) any later version.
63 + * Module load syntax:
64 + * insmod ip_conntrack_rtsp.o ports=port1,port2,...port<MAX_PORTS>
65 + * max_outstanding=n setup_timeout=secs
67 + * If no ports are specified, the default will be port 554.
69 + * With max_outstanding you can define the maximum number of not yet
70 + * answered SETUP requests per RTSP session (default 8).
71 + * With setup_timeout you can specify how long the system waits for
72 + * an expected data channel (default 300 seconds).
75 +#include <linux/config.h>
76 +#include <linux/module.h>
77 +#include <linux/netfilter.h>
78 +#include <linux/ip.h>
79 +#include <net/checksum.h>
82 +#include <linux/netfilter_ipv4/lockhelp.h>
83 +#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
84 +#include <linux/netfilter_ipv4/ip_conntrack_rtsp.h>
86 +#include <linux/ctype.h>
87 +#define NF_NEED_STRNCASECMP
88 +#define NF_NEED_STRTOU16
89 +#define NF_NEED_STRTOU32
90 +#define NF_NEED_NEXTLINE
91 +#include <linux/netfilter_helpers.h>
92 +#define NF_NEED_MIME_NEXTLINE
93 +#include <linux/netfilter_mime.h>
95 +#define MAX_SIMUL_SETUP 8 /* XXX: use max_outstanding */
97 +#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args)
98 +#ifdef IP_NF_RTSP_DEBUG
99 +#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args)
101 +#define DEBUGP(fmt, args...)
105 +static int ports[MAX_PORTS];
106 +static int num_ports = 0;
107 +static int max_outstanding = 8;
108 +static unsigned int setup_timeout = 300;
110 +MODULE_AUTHOR("Tom Marshall <tmarshall@real.com>");
111 +MODULE_DESCRIPTION("RTSP connection tracking module");
112 +MODULE_LICENSE("GPL");
114 +MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
115 +MODULE_PARM_DESC(ports, "port numbers of RTSP servers");
116 +MODULE_PARM(max_outstanding, "i");
117 +MODULE_PARM_DESC(max_outstanding, "max number of outstanding SETUP requests per RTSP session");
118 +MODULE_PARM(setup_timeout, "i");
119 +MODULE_PARM_DESC(setup_timeout, "timeout on for unestablished data channels");
122 +DECLARE_LOCK(ip_rtsp_lock);
123 +struct module* ip_conntrack_rtsp = THIS_MODULE;
126 + * Max mappings we will allow for one RTSP connection (for RTP, the number
127 + * of allocated ports is twice this value). Note that SMIL burns a lot of
128 + * ports so keep this reasonably high. If this is too low, you will see a
129 + * lot of "no free client map entries" messages.
131 +#define MAX_PORT_MAPS 16
133 +/*** default port list was here in the masq code: 554, 3030, 4040 ***/
135 +#define SKIP_WSPACE(ptr,len,off) while(off < len && isspace(*(ptr+off))) { off++; }
138 + * Parse an RTSP packet.
140 + * Returns zero if parsing failed.
143 + * IN ptcp tcp data pointer
144 + * IN tcplen tcp data len
145 + * IN/OUT ptcpoff points to current tcp offset
146 + * OUT phdrsoff set to offset of rtsp headers
147 + * OUT phdrslen set to length of rtsp headers
148 + * OUT pcseqoff set to offset of CSeq header
149 + * OUT pcseqlen set to length of CSeq header
152 +rtsp_parse_message(char* ptcp, uint tcplen, uint* ptcpoff,
153 + uint* phdrsoff, uint* phdrslen,
154 + uint* pcseqoff, uint* pcseqlen)
156 + uint entitylen = 0;
160 + if (!nf_nextline(ptcp, tcplen, ptcpoff, &lineoff, &linelen))
165 + *phdrsoff = *ptcpoff;
166 + while (nf_mime_nextline(ptcp, tcplen, ptcpoff, &lineoff, &linelen))
172 + *ptcpoff += min(entitylen, tcplen - *ptcpoff);
176 + if (lineoff+linelen > tcplen)
178 + INFOP("!! overrun !!\n");
182 + if (nf_strncasecmp(ptcp+lineoff, "CSeq:", 5) == 0)
184 + *pcseqoff = lineoff;
185 + *pcseqlen = linelen;
187 + if (nf_strncasecmp(ptcp+lineoff, "Content-Length:", 15) == 0)
189 + uint off = lineoff+15;
190 + SKIP_WSPACE(ptcp+lineoff, linelen, off);
191 + nf_strtou32(ptcp+off, &entitylen);
194 + *phdrslen = (*ptcpoff) - (*phdrsoff);
200 + * Find lo/hi client ports (if any) in transport header
202 + * ptcp, tcplen = packet
203 + * tranoff, tranlen = buffer to search
206 + * pport_lo, pport_hi = lo/hi ports (host endian)
208 + * Returns nonzero if any client ports found
210 + * Note: it is valid (and expected) for the client to request multiple
211 + * transports, so we need to parse the entire line.
214 +rtsp_parse_transport(char* ptran, uint tranlen,
215 + struct ip_ct_rtsp_expect* prtspexp)
220 + if (tranlen < 10 || !iseol(ptran[tranlen-1]) ||
221 + nf_strncasecmp(ptran, "Transport:", 10) != 0)
223 + INFOP("sanity check failed\n");
226 + DEBUGP("tran='%.*s'\n", (int)tranlen, ptran);
228 + SKIP_WSPACE(ptran, tranlen, off);
230 + /* Transport: tran;field;field=val,tran;field;field=val,... */
231 + while (off < tranlen)
233 + const char* pparamend;
236 + pparamend = memchr(ptran+off, ',', tranlen-off);
237 + pparamend = (pparamend == NULL) ? ptran+tranlen : pparamend+1;
238 + nextparamoff = pparamend-ptran;
240 + while (off < nextparamoff)
242 + const char* pfieldend;
245 + pfieldend = memchr(ptran+off, ';', nextparamoff-off);
246 + nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
248 + if (strncmp(ptran+off, "client_port=", 12) == 0)
254 + numlen = nf_strtou16(ptran+off, &port);
256 + if (prtspexp->loport != 0 && prtspexp->loport != port)
258 + DEBUGP("multiple ports found, port %hu ignored\n", port);
262 + prtspexp->loport = prtspexp->hiport = port;
263 + if (ptran[off] == '-')
266 + numlen = nf_strtou16(ptran+off, &port);
268 + prtspexp->pbtype = pb_range;
269 + prtspexp->hiport = port;
271 + // If we have a range, assume rtp:
272 + // loport must be even, hiport must be loport+1
273 + if ((prtspexp->loport & 0x0001) != 0 ||
274 + prtspexp->hiport != prtspexp->loport+1)
276 + DEBUGP("incorrect range: %hu-%hu, correcting\n",
277 + prtspexp->loport, prtspexp->hiport);
278 + prtspexp->loport &= 0xfffe;
279 + prtspexp->hiport = prtspexp->loport+1;
282 + else if (ptran[off] == '/')
285 + numlen = nf_strtou16(ptran+off, &port);
287 + prtspexp->pbtype = pb_discon;
288 + prtspexp->hiport = port;
295 + * Note we don't look for the destination parameter here.
296 + * If we are using NAT, the NAT module will handle it. If not,
297 + * and the client is sending packets elsewhere, the expectation
298 + * will quietly time out.
301 + off = nextfieldoff;
304 + off = nextparamoff;
310 +/*** conntrack functions ***/
312 +/* outbound packet: client->server */
314 +help_out(const struct iphdr* iph, size_t pktlen,
315 + struct ip_conntrack* ct, enum ip_conntrack_info ctinfo)
317 + int dir = CTINFO2DIR(ctinfo); /* = IP_CT_DIR_ORIGINAL */
318 + struct tcphdr* tcph = (void*)iph + iph->ihl * 4;
319 + uint tcplen = pktlen - iph->ihl * 4;
320 + char* pdata = (char*)tcph + tcph->doff * 4;
321 + uint datalen = tcplen - tcph->doff * 4;
324 + struct ip_conntrack_expect exp;
326 + while (dataoff < datalen)
328 + uint cmdoff = dataoff;
338 + if (!rtsp_parse_message(pdata, datalen, &dataoff,
339 + &hdrsoff, &hdrslen,
340 + &cseqoff, &cseqlen))
342 + break; /* not a valid message */
345 + if (strncmp(pdata+cmdoff, "SETUP ", 6) != 0)
347 + continue; /* not a SETUP message */
349 + DEBUGP("found a setup message\n");
351 + memset(&exp, 0, sizeof(exp));
354 + while (nf_mime_nextline(pdata+hdrsoff, hdrslen, &off,
355 + &lineoff, &linelen))
361 + if (off > hdrsoff+hdrslen)
363 + INFOP("!! overrun !!");
367 + if (nf_strncasecmp(pdata+hdrsoff+lineoff, "Transport:", 10) == 0)
369 + rtsp_parse_transport(pdata+hdrsoff+lineoff, linelen,
370 + &exp.help.exp_rtsp_info);
374 + if (exp.help.exp_rtsp_info.loport == 0)
376 + DEBUGP("no udp transports found\n");
377 + continue; /* no udp transports found */
380 + DEBUGP("udp transport found, ports=(%d,%hu,%hu)\n",
381 + (int)exp.help.exp_rtsp_info.pbtype,
382 + exp.help.exp_rtsp_info.loport,
383 + exp.help.exp_rtsp_info.hiport);
385 + LOCK_BH(&ip_rtsp_lock);
386 + exp.seq = ntohl(tcph->seq) + hdrsoff; /* mark all the headers */
387 + exp.help.exp_rtsp_info.len = hdrslen;
389 + exp.tuple.src.ip = ct->tuplehash[!dir].tuple.src.ip;
390 + exp.mask.src.ip = 0xffffffff;
391 + exp.tuple.dst.ip = ct->tuplehash[dir].tuple.src.ip;
392 + exp.mask.dst.ip = 0xffffffff;
393 + exp.tuple.dst.u.udp.port = exp.help.exp_rtsp_info.loport;
394 + exp.mask.dst.u.udp.port = (exp.help.exp_rtsp_info.pbtype == pb_range) ? 0xfffe : 0xffff;
395 + exp.tuple.dst.protonum = IPPROTO_UDP;
396 + exp.mask.dst.protonum = 0xffff;
398 + DEBUGP("expect_related %u.%u.%u.%u:%u-%u.%u.%u.%u:%u\n",
399 + NIPQUAD(exp.tuple.src.ip),
400 + ntohs(exp.tuple.src.u.tcp.port),
401 + NIPQUAD(exp.tuple.dst.ip),
402 + ntohs(exp.tuple.dst.u.tcp.port));
404 + /* pass the request off to the nat helper */
405 + rc = ip_conntrack_expect_related(ct, &exp);
406 + UNLOCK_BH(&ip_rtsp_lock);
409 + DEBUGP("ip_conntrack_expect_related succeeded\n");
413 + INFOP("ip_conntrack_expect_related failed (%d)\n", rc);
420 +/* inbound packet: server->client */
422 +help_in(const struct iphdr* iph, size_t pktlen,
423 + struct ip_conntrack* ct, enum ip_conntrack_info ctinfo)
429 +help(const struct iphdr* iph, size_t pktlen,
430 + struct ip_conntrack* ct, enum ip_conntrack_info ctinfo)
432 + /* tcplen not negative guarenteed by ip_conntrack_tcp.c */
433 + struct tcphdr* tcph = (void*)iph + iph->ihl * 4;
434 + u_int32_t tcplen = pktlen - iph->ihl * 4;
436 + /* Until there's been traffic both ways, don't look in packets. */
437 + if (ctinfo != IP_CT_ESTABLISHED && ctinfo != IP_CT_ESTABLISHED + IP_CT_IS_REPLY)
439 + DEBUGP("conntrackinfo = %u\n", ctinfo);
443 + /* Not whole TCP header? */
444 + if (tcplen < sizeof(struct tcphdr) || tcplen < tcph->doff * 4)
446 + DEBUGP("tcplen = %u\n", (unsigned)tcplen);
450 + /* Checksum invalid? Ignore. */
451 + /* FIXME: Source route IP option packets --RR */
452 + if (tcp_v4_check(tcph, tcplen, iph->saddr, iph->daddr,
453 + csum_partial((char*)tcph, tcplen, 0)))
455 + DEBUGP("bad csum: %p %u %u.%u.%u.%u %u.%u.%u.%u\n",
456 + tcph, tcplen, NIPQUAD(iph->saddr), NIPQUAD(iph->daddr));
460 + switch (CTINFO2DIR(ctinfo))
462 + case IP_CT_DIR_ORIGINAL:
463 + help_out(iph, pktlen, ct, ctinfo);
465 + case IP_CT_DIR_REPLY:
466 + help_in(iph, pktlen, ct, ctinfo);
473 +static struct ip_conntrack_helper rtsp_helpers[MAX_PORTS];
474 +static char rtsp_names[MAX_PORTS][10];
476 +/* This function is intentionally _NOT_ defined as __exit */
481 + for (i = 0; i < num_ports; i++)
483 + DEBUGP("unregistering port %d\n", ports[i]);
484 + ip_conntrack_helper_unregister(&rtsp_helpers[i]);
492 + struct ip_conntrack_helper *hlpr;
495 + printk("ip_conntrack_rtsp v" IP_NF_RTSP_VERSION " loading\n");
497 + if (max_outstanding < 1)
499 + printk("ip_conntrack_rtsp: max_outstanding must be a positive integer\n");
502 + if (setup_timeout < 0)
504 + printk("ip_conntrack_rtsp: setup_timeout must be a positive integer\n");
508 + /* If no port given, default to standard rtsp port */
511 + ports[0] = RTSP_PORT;
514 + for (i = 0; (i < MAX_PORTS) && ports[i]; i++)
516 + hlpr = &rtsp_helpers[i];
517 + memset(hlpr, 0, sizeof(struct ip_conntrack_helper));
518 + hlpr->tuple.src.u.tcp.port = htons(ports[i]);
519 + hlpr->tuple.dst.protonum = IPPROTO_TCP;
520 + hlpr->mask.src.u.tcp.port = 0xFFFF;
521 + hlpr->mask.dst.protonum = 0xFFFF;
522 + hlpr->max_expected = max_outstanding;
523 + hlpr->timeout = setup_timeout;
524 + hlpr->flags = IP_CT_HELPER_F_REUSE_EXPECT;
525 + hlpr->me = ip_conntrack_rtsp;
528 + tmpname = &rtsp_names[i][0];
529 + if (ports[i] == RTSP_PORT)
531 + sprintf(tmpname, "rtsp");
535 + sprintf(tmpname, "rtsp-%d", i);
537 + hlpr->name = tmpname;
539 + DEBUGP("port #%d: %d\n", i, ports[i]);
541 + ret = ip_conntrack_helper_register(hlpr);
545 + printk("ip_conntrack_rtsp: ERROR registering port %d\n", ports[i]);
554 +#ifdef CONFIG_IP_NF_NAT_NEEDED
555 +EXPORT_SYMBOL(ip_rtsp_lock);
560 diff -urN linux-2.4.32/net/ipv4/netfilter/ip_nat_rtsp.c linux-2.4.32.new/net/ipv4/netfilter/ip_nat_rtsp.c
561 --- linux-2.4.32/net/ipv4/netfilter/ip_nat_rtsp.c 1970-01-01 01:00:00.000000000 +0100
562 +++ linux-2.4.32.new/net/ipv4/netfilter/ip_nat_rtsp.c 2006-03-01 00:55:14.467150168 +0100
565 + * RTSP extension for TCP NAT alteration
566 + * (C) 2003 by Tom Marshall <tmarshall@real.com>
567 + * based on ip_nat_irc.c
569 + * This program is free software; you can redistribute it and/or
570 + * modify it under the terms of the GNU General Public License
571 + * as published by the Free Software Foundation; either version
572 + * 2 of the License, or (at your option) any later version.
574 + * Module load syntax:
575 + * insmod ip_nat_rtsp.o ports=port1,port2,...port<MAX_PORTS>
576 + * stunaddr=<address>
577 + * destaction=[auto|strip|none]
579 + * If no ports are specified, the default will be port 554 only.
581 + * stunaddr specifies the address used to detect that a client is using STUN.
582 + * If this address is seen in the destination parameter, it is assumed that
583 + * the client has already punched a UDP hole in the firewall, so we don't
584 + * mangle the client_port. If none is specified, it is autodetected. It
585 + * only needs to be set if you have multiple levels of NAT. It should be
586 + * set to the external address that the STUN clients detect. Note that in
587 + * this case, it will not be possible for clients to use UDP with servers
588 + * between the NATs.
590 + * If no destaction is specified, auto is used.
591 + * destaction=auto: strip destination parameter if it is not stunaddr.
592 + * destaction=strip: always strip destination parameter (not recommended).
593 + * destaction=none: do not touch destination parameter (not recommended).
596 +#include <linux/module.h>
597 +#include <linux/netfilter_ipv4.h>
598 +#include <linux/ip.h>
599 +#include <linux/tcp.h>
600 +#include <linux/kernel.h>
601 +#include <net/tcp.h>
602 +#include <linux/netfilter_ipv4/ip_nat.h>
603 +#include <linux/netfilter_ipv4/ip_nat_helper.h>
604 +#include <linux/netfilter_ipv4/ip_nat_rule.h>
605 +#include <linux/netfilter_ipv4/ip_conntrack_rtsp.h>
606 +#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
608 +#include <linux/inet.h>
609 +#include <linux/ctype.h>
610 +#define NF_NEED_STRNCASECMP
611 +#define NF_NEED_STRTOU16
612 +#include <linux/netfilter_helpers.h>
613 +#define NF_NEED_MIME_NEXTLINE
614 +#include <linux/netfilter_mime.h>
616 +#define INFOP(fmt, args...) printk(KERN_INFO "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args)
617 +#ifdef IP_NF_RTSP_DEBUG
618 +#define DEBUGP(fmt, args...) printk(KERN_DEBUG "%s: %s: " fmt, __FILE__, __FUNCTION__ , ## args)
620 +#define DEBUGP(fmt, args...)
624 +#define DSTACT_AUTO 0
625 +#define DSTACT_STRIP 1
626 +#define DSTACT_NONE 2
628 +static int ports[MAX_PORTS];
629 +static char* stunaddr = NULL;
630 +static char* destaction = NULL;
632 +static int num_ports = 0;
633 +static u_int32_t extip = 0;
634 +static int dstact = 0;
636 +MODULE_AUTHOR("Tom Marshall <tmarshall@real.com>");
637 +MODULE_DESCRIPTION("RTSP network address translation module");
638 +MODULE_LICENSE("GPL");
640 +MODULE_PARM(ports, "1-" __MODULE_STRING(MAX_PORTS) "i");
641 +MODULE_PARM_DESC(ports, "port numbers of RTSP servers");
642 +MODULE_PARM(stunaddr, "s");
643 +MODULE_PARM_DESC(stunaddr, "Address for detecting STUN");
644 +MODULE_PARM(destaction, "s");
645 +MODULE_PARM_DESC(destaction, "Action for destination parameter (auto/strip/none)");
648 +/* protects rtsp part of conntracks */
649 +DECLARE_LOCK_EXTERN(ip_rtsp_lock);
651 +#define SKIP_WSPACE(ptr,len,off) while(off < len && isspace(*(ptr+off))) { off++; }
653 +/*** helper functions ***/
656 +get_skb_tcpdata(struct sk_buff* skb, char** pptcpdata, uint* ptcpdatalen)
658 + struct iphdr* iph = (struct iphdr*)skb->nh.iph;
659 + struct tcphdr* tcph = (struct tcphdr*)((char*)iph + iph->ihl*4);
661 + *pptcpdata = (char*)tcph + tcph->doff*4;
662 + *ptcpdatalen = ((char*)skb->h.raw + skb->len) - *pptcpdata;
665 +/*** nat functions ***/
668 + * Mangle the "Transport:" header:
669 + * - Replace all occurences of "client_port=<spec>"
670 + * - Handle destination parameter
673 + * ct, ctinfo = conntrack context
675 + * tranoff = Transport header offset from TCP data
676 + * tranlen = Transport header length (incl. CRLF)
677 + * rport_lo = replacement low port (host endian)
678 + * rport_hi = replacement high port (host endian)
680 + * Returns packet size difference.
682 + * Assumes that a complete transport header is present, ending with CR or LF
685 +rtsp_mangle_tran(struct ip_conntrack* ct, enum ip_conntrack_info ctinfo,
686 + struct ip_conntrack_expect* exp,
687 + struct sk_buff** pskb, uint tranoff, uint tranlen)
692 + char rbuf1[16]; /* Replacement buffer (one port) */
693 + uint rbuf1len; /* Replacement len (one port) */
694 + char rbufa[16]; /* Replacement buffer (all ports) */
695 + uint rbufalen; /* Replacement len (all ports) */
697 + u_int16_t loport, hiport;
699 + uint diff; /* Number of bytes we removed */
701 + struct ip_ct_rtsp_expect* prtspexp = &exp->help.exp_rtsp_info;
702 + struct ip_conntrack_tuple t;
704 + char szextaddr[15+1];
708 + get_skb_tcpdata(*pskb, &ptcp, &tcplen);
709 + ptran = ptcp+tranoff;
711 + if (tranoff+tranlen > tcplen || tcplen-tranoff < tranlen ||
712 + tranlen < 10 || !iseol(ptran[tranlen-1]) ||
713 + nf_strncasecmp(ptran, "Transport:", 10) != 0)
715 + INFOP("sanity check failed\n");
719 + SKIP_WSPACE(ptcp+tranoff, tranlen, off);
721 + newip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip;
725 + extaddrlen = extip ? sprintf(szextaddr, "%u.%u.%u.%u", NIPQUAD(extip))
726 + : sprintf(szextaddr, "%u.%u.%u.%u", NIPQUAD(newip));
727 + DEBUGP("stunaddr=%s (%s)\n", szextaddr, (extip?"forced":"auto"));
729 + rbuf1len = rbufalen = 0;
730 + switch (prtspexp->pbtype)
733 + for (loport = prtspexp->loport; loport != 0; loport++) /* XXX: improper wrap? */
735 + t.dst.u.udp.port = htons(loport);
736 + if (ip_conntrack_change_expect(exp, &t) == 0)
738 + DEBUGP("using port %hu\n", loport);
744 + rbuf1len = sprintf(rbuf1, "%hu", loport);
745 + rbufalen = sprintf(rbufa, "%hu", loport);
749 + for (loport = prtspexp->loport; loport != 0; loport += 2) /* XXX: improper wrap? */
751 + t.dst.u.udp.port = htons(loport);
752 + if (ip_conntrack_change_expect(exp, &t) == 0)
754 + hiport = loport + ~exp->mask.dst.u.udp.port;
755 + DEBUGP("using ports %hu-%hu\n", loport, hiport);
761 + rbuf1len = sprintf(rbuf1, "%hu", loport);
762 + rbufalen = sprintf(rbufa, "%hu-%hu", loport, loport+1);
766 + for (loport = prtspexp->loport; loport != 0; loport++) /* XXX: improper wrap? */
768 + t.dst.u.udp.port = htons(loport);
769 + if (ip_conntrack_change_expect(exp, &t) == 0)
771 + DEBUGP("using port %hu (1 of 2)\n", loport);
775 + for (hiport = prtspexp->hiport; hiport != 0; hiport++) /* XXX: improper wrap? */
777 + t.dst.u.udp.port = htons(hiport);
778 + if (ip_conntrack_change_expect(exp, &t) == 0)
780 + DEBUGP("using port %hu (2 of 2)\n", hiport);
784 + if (loport != 0 && hiport != 0)
786 + rbuf1len = sprintf(rbuf1, "%hu", loport);
787 + if (hiport == loport+1)
789 + rbufalen = sprintf(rbufa, "%hu-%hu", loport, hiport);
793 + rbufalen = sprintf(rbufa, "%hu/%hu", loport, hiport);
801 + return 0; /* cannot get replacement port(s) */
804 + /* Transport: tran;field;field=val,tran;field;field=val,... */
805 + while (off < tranlen)
808 + const char* pparamend;
811 + pparamend = memchr(ptran+off, ',', tranlen-off);
812 + pparamend = (pparamend == NULL) ? ptran+tranlen : pparamend+1;
813 + nextparamoff = pparamend-ptcp;
816 + * We pass over each param twice. On the first pass, we look for a
817 + * destination= field. It is handled by the security policy. If it
818 + * is present, allowed, and equal to our external address, we assume
819 + * that STUN is being used and we leave the client_port= field alone.
823 + while (off < nextparamoff)
825 + const char* pfieldend;
828 + pfieldend = memchr(ptran+off, ';', nextparamoff-off);
829 + nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
831 + if (dstact != DSTACT_NONE && strncmp(ptran+off, "destination=", 12) == 0)
833 + if (strncmp(ptran+off+12, szextaddr, extaddrlen) == 0)
837 + if (dstact == DSTACT_STRIP || (dstact == DSTACT_AUTO && !is_stun))
839 + diff = nextfieldoff-off;
840 + if (!ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
841 + off, diff, NULL, 0))
843 + /* mangle failed, all we can do is bail */
846 + get_skb_tcpdata(*pskb, &ptcp, &tcplen);
847 + ptran = ptcp+tranoff;
849 + nextparamoff -= diff;
850 + nextfieldoff -= diff;
854 + off = nextfieldoff;
861 + while (off < nextparamoff)
863 + const char* pfieldend;
866 + pfieldend = memchr(ptran+off, ';', nextparamoff-off);
867 + nextfieldoff = (pfieldend == NULL) ? nextparamoff : pfieldend-ptran+1;
869 + if (strncmp(ptran+off, "client_port=", 12) == 0)
875 + char* rbuf = rbuf1;
876 + uint rbuflen = rbuf1len;
879 + origoff = (ptran-ptcp)+off;
881 + numlen = nf_strtou16(ptran+off, &port);
884 + if (port != prtspexp->loport)
886 + DEBUGP("multiple ports found, port %hu ignored\n", port);
890 + if (ptran[off] == '-' || ptran[off] == '/')
894 + numlen = nf_strtou16(ptran+off, &port);
898 + rbuflen = rbufalen;
902 + * note we cannot just memcpy() if the sizes are the same.
903 + * the mangle function does skb resizing, checks for a
904 + * cloned skb, and updates the checksums.
906 + * parameter 4 below is offset from start of tcp data.
908 + diff = origlen-rbuflen;
909 + if (!ip_nat_mangle_tcp_packet(pskb, ct, ctinfo,
910 + origoff, origlen, rbuf, rbuflen))
912 + /* mangle failed, all we can do is bail */
915 + get_skb_tcpdata(*pskb, &ptcp, &tcplen);
916 + ptran = ptcp+tranoff;
918 + nextparamoff -= diff;
919 + nextfieldoff -= diff;
923 + off = nextfieldoff;
926 + off = nextparamoff;
933 +expected(struct sk_buff **pskb, uint hooknum, struct ip_conntrack* ct, struct ip_nat_info* info)
935 + struct ip_nat_multi_range mr;
936 + u_int32_t newdstip, newsrcip, newip;
938 + struct ip_conntrack *master = master_ct(ct);
940 + IP_NF_ASSERT(info);
941 + IP_NF_ASSERT(master);
943 + IP_NF_ASSERT(!(info->initialized & (1 << HOOK2MANIP(hooknum))));
945 + newdstip = master->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip;
946 + newsrcip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip;
947 + newip = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC) ? newsrcip : newdstip;
949 + DEBUGP("newsrcip=%u.%u.%u.%u, newdstip=%u.%u.%u.%u, newip=%u.%u.%u.%u\n",
950 + NIPQUAD(newsrcip), NIPQUAD(newdstip), NIPQUAD(newip));
953 + /* We don't want to manip the per-protocol, just the IPs. */
954 + mr.range[0].flags = IP_NAT_RANGE_MAP_IPS;
955 + mr.range[0].min_ip = mr.range[0].max_ip = newip;
957 + return ip_nat_setup_info(ct, &mr, hooknum);
961 +help_out(struct ip_conntrack* ct, enum ip_conntrack_info ctinfo,
962 + struct ip_conntrack_expect* exp, struct sk_buff** pskb)
972 + struct iphdr* iph = (struct iphdr*)(*pskb)->nh.iph;
973 + struct tcphdr* tcph = (struct tcphdr*)((void*)iph + iph->ihl*4);
975 + struct ip_ct_rtsp_expect* prtspexp = &exp->help.exp_rtsp_info;
977 + get_skb_tcpdata(*pskb, &ptcp, &tcplen);
979 + hdrsoff = exp->seq - ntohl(tcph->seq);
980 + hdrslen = prtspexp->len;
983 + while (nf_mime_nextline(ptcp, hdrsoff+hdrslen, &off, &lineoff, &linelen))
989 + if (off > hdrsoff+hdrslen)
991 + INFOP("!! overrun !!");
994 + DEBUGP("hdr: len=%u, %.*s", linelen, (int)linelen, ptcp+lineoff);
996 + if (nf_strncasecmp(ptcp+lineoff, "Transport:", 10) == 0)
998 + uint oldtcplen = tcplen;
999 + if (!rtsp_mangle_tran(ct, ctinfo, exp, pskb, lineoff, linelen))
1003 + get_skb_tcpdata(*pskb, &ptcp, &tcplen);
1004 + hdrslen -= (oldtcplen-tcplen);
1005 + off -= (oldtcplen-tcplen);
1006 + lineoff -= (oldtcplen-tcplen);
1007 + linelen -= (oldtcplen-tcplen);
1008 + DEBUGP("rep: len=%u, %.*s", linelen, (int)linelen, ptcp+lineoff);
1016 +help_in(struct ip_conntrack* ct, enum ip_conntrack_info ctinfo,
1017 + struct ip_conntrack_expect* exp, struct sk_buff** pskb)
1019 + /* XXX: unmangle */
1024 +help(struct ip_conntrack* ct,
1025 + struct ip_conntrack_expect* exp,
1026 + struct ip_nat_info* info,
1027 + enum ip_conntrack_info ctinfo,
1028 + unsigned int hooknum,
1029 + struct sk_buff** pskb)
1031 + struct iphdr* iph = (struct iphdr*)(*pskb)->nh.iph;
1032 + struct tcphdr* tcph = (struct tcphdr*)((char*)iph + iph->ihl * 4);
1035 + struct ip_ct_rtsp_expect* ct_rtsp_info;
1036 + int rc = NF_ACCEPT;
1038 + if (ct == NULL || exp == NULL || info == NULL || pskb == NULL)
1040 + DEBUGP("!! null ptr (%p,%p,%p,%p) !!\n", ct, exp, info, pskb);
1044 + ct_rtsp_info = &exp->help.exp_rtsp_info;
1047 + * Only mangle things once: original direction in POST_ROUTING
1048 + * and reply direction on PRE_ROUTING.
1050 + dir = CTINFO2DIR(ctinfo);
1051 + if (!((hooknum == NF_IP_POST_ROUTING && dir == IP_CT_DIR_ORIGINAL)
1052 + || (hooknum == NF_IP_PRE_ROUTING && dir == IP_CT_DIR_REPLY)))
1054 + DEBUGP("Not touching dir %s at hook %s\n",
1055 + dir == IP_CT_DIR_ORIGINAL ? "ORIG" : "REPLY",
1056 + hooknum == NF_IP_POST_ROUTING ? "POSTROUTING"
1057 + : hooknum == NF_IP_PRE_ROUTING ? "PREROUTING"
1058 + : hooknum == NF_IP_LOCAL_OUT ? "OUTPUT" : "???");
1061 + DEBUGP("got beyond not touching\n");
1063 + datalen = (*pskb)->len - iph->ihl * 4 - tcph->doff * 4;
1065 + LOCK_BH(&ip_rtsp_lock);
1066 + /* Ensure the packet contains all of the marked data */
1067 + if (!between(exp->seq + ct_rtsp_info->len,
1068 + ntohl(tcph->seq), ntohl(tcph->seq) + datalen))
1070 + /* Partial retransmission? Probably a hacker. */
1071 + if (net_ratelimit())
1073 + INFOP("partial packet %u/%u in %u/%u\n",
1074 + exp->seq, ct_rtsp_info->len, ntohl(tcph->seq), ntohl(tcph->seq) + datalen);
1076 + UNLOCK_BH(&ip_rtsp_lock);
1082 + case IP_CT_DIR_ORIGINAL:
1083 + rc = help_out(ct, ctinfo, exp, pskb);
1085 + case IP_CT_DIR_REPLY:
1086 + rc = help_in(ct, ctinfo, exp, pskb);
1089 + UNLOCK_BH(&ip_rtsp_lock);
1094 +static struct ip_nat_helper ip_nat_rtsp_helpers[MAX_PORTS];
1095 +static char rtsp_names[MAX_PORTS][10];
1097 +/* This function is intentionally _NOT_ defined as __exit */
1103 + for (i = 0; i < num_ports; i++)
1105 + DEBUGP("unregistering helper for port %d\n", ports[i]);
1106 + ip_nat_helper_unregister(&ip_nat_rtsp_helpers[i]);
1115 + struct ip_nat_helper* hlpr;
1118 + printk("ip_nat_rtsp v" IP_NF_RTSP_VERSION " loading\n");
1120 + if (ports[0] == 0)
1122 + ports[0] = RTSP_PORT;
1125 + for (i = 0; (i < MAX_PORTS) && ports[i] != 0; i++)
1127 + hlpr = &ip_nat_rtsp_helpers[i];
1128 + memset(hlpr, 0, sizeof(struct ip_nat_helper));
1130 + hlpr->tuple.dst.protonum = IPPROTO_TCP;
1131 + hlpr->tuple.src.u.tcp.port = htons(ports[i]);
1132 + hlpr->mask.src.u.tcp.port = 0xFFFF;
1133 + hlpr->mask.dst.protonum = 0xFFFF;
1134 + hlpr->help = help;
1136 + hlpr->me = THIS_MODULE;
1137 + hlpr->expect = expected;
1139 + tmpname = &rtsp_names[i][0];
1140 + if (ports[i] == RTSP_PORT)
1142 + sprintf(tmpname, "rtsp");
1146 + sprintf(tmpname, "rtsp-%d", i);
1148 + hlpr->name = tmpname;
1150 + DEBUGP("registering helper for port %d: name %s\n", ports[i], hlpr->name);
1151 + ret = ip_nat_helper_register(hlpr);
1155 + printk("ip_nat_rtsp: error registering helper for port %d\n", ports[i]);
1161 + if (stunaddr != NULL)
1163 + extip = in_aton(stunaddr);
1165 + if (destaction != NULL)
1167 + if (strcmp(destaction, "auto") == 0)
1169 + dstact = DSTACT_AUTO;
1171 + if (strcmp(destaction, "strip") == 0)
1173 + dstact = DSTACT_STRIP;
1175 + if (strcmp(destaction, "none") == 0)
1177 + dstact = DSTACT_NONE;
1185 --- linux-2.4.32/arch/mips/kernel/mips_ksyms.c 2006-03-01 00:49:34.142887320 +0100
1186 +++ linux-2.4.32.new/arch/mips/kernel/mips_ksyms.c 2006-03-01 00:55:14.469149864 +0100
1191 +EXPORT_SYMBOL_NOVERS(memchr);
1192 EXPORT_SYMBOL_NOVERS(memcmp);
1193 EXPORT_SYMBOL_NOVERS(memset);
1194 EXPORT_SYMBOL_NOVERS(memcpy);
1195 diff -urN linux-2.4.32/include/linux/netfilter_helpers.h linux-2.4.32.new/include/linux/netfilter_helpers.h
1196 --- linux-2.4.32/include/linux/netfilter_helpers.h 1970-01-01 01:00:00.000000000 +0100
1197 +++ linux-2.4.32.new/include/linux/netfilter_helpers.h 2006-03-01 00:55:14.470149712 +0100
1200 + * Helpers for netfiler modules. This file provides implementations for basic
1201 + * functions such as strncasecmp(), etc.
1203 + * gcc will warn for defined but unused functions, so we only include the
1204 + * functions requested. The following macros are used:
1205 + * NF_NEED_STRNCASECMP nf_strncasecmp()
1206 + * NF_NEED_STRTOU16 nf_strtou16()
1207 + * NF_NEED_STRTOU32 nf_strtou32()
1209 +#ifndef _NETFILTER_HELPERS_H
1210 +#define _NETFILTER_HELPERS_H
1212 +/* Only include these functions for kernel code. */
1215 +#include <linux/ctype.h>
1216 +#define iseol(c) ( (c) == '\r' || (c) == '\n' )
1219 + * The standard strncasecmp()
1221 +#ifdef NF_NEED_STRNCASECMP
1223 +nf_strncasecmp(const char* s1, const char* s2, u_int32_t len)
1225 + if (s1 == NULL || s2 == NULL)
1227 + if (s1 == NULL && s2 == NULL)
1231 + return (s1 == NULL) ? -1 : 1;
1233 + while (len > 0 && tolower(*s1) == tolower(*s2))
1239 + return ( (len == 0) ? 0 : (tolower(*s1) - tolower(*s2)) );
1241 +#endif /* NF_NEED_STRNCASECMP */
1244 + * Parse a string containing a 16-bit unsigned integer.
1245 + * Returns the number of chars used, or zero if no number is found.
1247 +#ifdef NF_NEED_STRTOU16
1249 +nf_strtou16(const char* pbuf, u_int16_t* pval)
1254 + while (isdigit(pbuf[n]))
1256 + *pval = (*pval * 10) + (pbuf[n] - '0');
1262 +#endif /* NF_NEED_STRTOU16 */
1265 + * Parse a string containing a 32-bit unsigned integer.
1266 + * Returns the number of chars used, or zero if no number is found.
1268 +#ifdef NF_NEED_STRTOU32
1270 +nf_strtou32(const char* pbuf, u_int32_t* pval)
1275 + while (pbuf[n] >= '0' && pbuf[n] <= '9')
1277 + *pval = (*pval * 10) + (pbuf[n] - '0');
1283 +#endif /* NF_NEED_STRTOU32 */
1286 + * Given a buffer and length, advance to the next line and mark the current
1289 +#ifdef NF_NEED_NEXTLINE
1291 +nf_nextline(char* p, uint len, uint* poff, uint* plineoff, uint* plinelen)
1301 + while (p[off] != '\n')
1312 + /* if we saw a crlf, physlen needs adjusted */
1313 + if (physlen > 0 && p[off] == '\n' && p[off-1] == '\r')
1318 + /* advance past the newline */
1321 + *plineoff = *poff;
1322 + *plinelen = physlen;
1327 +#endif /* NF_NEED_NEXTLINE */
1329 +#endif /* __KERNEL__ */
1331 +#endif /* _NETFILTER_HELPERS_H */
1332 diff -urN linux-2.4.32/include/linux/netfilter_ipv4/ip_conntrack_rtsp.h linux-2.4.32.new/include/linux/netfilter_ipv4/ip_conntrack_rtsp.h
1333 --- linux-2.4.32/include/linux/netfilter_ipv4/ip_conntrack_rtsp.h 1970-01-01 01:00:00.000000000 +0100
1334 +++ linux-2.4.32.new/include/linux/netfilter_ipv4/ip_conntrack_rtsp.h 2006-03-01 00:55:14.472149408 +0100
1337 + * RTSP extension for IP connection tracking.
1338 + * (C) 2003 by Tom Marshall <tmarshall@real.com>
1339 + * based on ip_conntrack_irc.h
1341 + * This program is free software; you can redistribute it and/or
1342 + * modify it under the terms of the GNU General Public License
1343 + * as published by the Free Software Foundation; either version
1344 + * 2 of the License, or (at your option) any later version.
1346 +#ifndef _IP_CONNTRACK_RTSP_H
1347 +#define _IP_CONNTRACK_RTSP_H
1349 +/* #define IP_NF_RTSP_DEBUG */
1350 +#define IP_NF_RTSP_VERSION "0.01"
1352 +/* port block types */
1354 + pb_single, /* client_port=x */
1355 + pb_range, /* client_port=x-y */
1356 + pb_discon /* client_port=x/y (rtspbis) */
1359 +/* We record seq number and length of rtsp headers here, all in host order. */
1362 + * This structure is per expected connection. It is a member of struct
1363 + * ip_conntrack_expect. The TCP SEQ for the conntrack expect is stored
1364 + * there and we are expected to only store the length of the data which
1365 + * needs replaced. If a packet contains multiple RTSP messages, we create
1366 + * one expected connection per message.
1368 + * We use these variables to mark the entire header block. This may seem
1369 + * like overkill, but the nature of RTSP requires it. A header may appear
1370 + * multiple times in a message. We must treat two Transport headers the
1371 + * same as one Transport header with two entries.
1373 +struct ip_ct_rtsp_expect
1375 + u_int32_t len; /* length of header block */
1376 + portblock_t pbtype; /* Type of port block that was requested */
1377 + u_int16_t loport; /* Port that was requested, low or first */
1378 + u_int16_t hiport; /* Port that was requested, high or second */
1380 + uint method; /* RTSP method */
1381 + uint cseq; /* CSeq from request */
1385 +/* This structure exists only once per master */
1386 +struct ip_ct_rtsp_master
1394 +#include <linux/netfilter_ipv4/lockhelp.h>
1396 +#define RTSP_PORT 554
1398 +/* Protects rtsp part of conntracks */
1399 +DECLARE_LOCK_EXTERN(ip_rtsp_lock);
1401 +#endif /* __KERNEL__ */
1403 +#endif /* _IP_CONNTRACK_RTSP_H */
1404 diff -urN linux-2.4.32/include/linux/netfilter_mime.h linux-2.4.32.new/include/linux/netfilter_mime.h
1405 --- linux-2.4.32/include/linux/netfilter_mime.h 1970-01-01 01:00:00.000000000 +0100
1406 +++ linux-2.4.32.new/include/linux/netfilter_mime.h 2006-03-01 00:55:14.473149256 +0100
1409 + * MIME functions for netfilter modules. This file provides implementations
1410 + * for basic MIME parsing. MIME headers are used in many protocols, such as
1411 + * HTTP, RTSP, SIP, etc.
1413 + * gcc will warn for defined but unused functions, so we only include the
1414 + * functions requested. The following macros are used:
1415 + * NF_NEED_MIME_NEXTLINE nf_mime_nextline()
1417 +#ifndef _NETFILTER_MIME_H
1418 +#define _NETFILTER_MIME_H
1420 +/* Only include these functions for kernel code. */
1423 +#include <linux/kernel.h>
1424 +#include <linux/ctype.h>
1427 + * Given a buffer and length, advance to the next line and mark the current
1428 + * line. If the current line is empty, *plinelen will be set to zero. If
1429 + * not, it will be set to the actual line length (including CRLF).
1431 + * 'line' in this context means logical line (includes LWS continuations).
1432 + * Returns 1 on success, 0 on failure.
1434 +#ifdef NF_NEED_MIME_NEXTLINE
1436 +nf_mime_nextline(char* p, uint len, uint* poff, uint* plineoff, uint* plinelen)
1440 + int is_first_line = 1;
1449 + while (p[off] != '\n')
1460 + /* if we saw a crlf, physlen needs adjusted */
1461 + if (physlen > 0 && p[off] == '\n' && p[off-1] == '\r')
1466 + /* advance past the newline */
1469 + /* check for an empty line */
1475 + /* check for colon on the first physical line */
1476 + if (is_first_line)
1478 + is_first_line = 0;
1479 + if (memchr(p+(*poff), ':', physlen) == NULL)
1485 + while (p[off] == ' ' || p[off] == '\t');
1487 + *plineoff = *poff;
1488 + *plinelen = (physlen == 0) ? 0 : (off - *poff);
1493 +#endif /* NF_NEED_MIME_NEXTLINE */
1495 +#endif /* __KERNEL__ */
1497 +#endif /* _NETFILTER_MIME_H */
1498 --- linux-2.4.32/include/linux/netfilter_ipv4/ip_conntrack.h 2006-03-01 00:53:57.889791696 +0100
1499 +++ linux-2.4.32.new/include/linux/netfilter_ipv4/ip_conntrack.h 2006-03-01 01:06:32.178122440 +0100
1501 #include <linux/netfilter_ipv4/ip_conntrack_irc.h>
1502 #include <linux/netfilter_ipv4/ip_conntrack_pptp.h>
1503 #include <linux/netfilter_ipv4/ip_conntrack_h323.h>
1504 +#include <linux/netfilter_ipv4/ip_conntrack_rtsp.h>
1506 /* per expectation: application helper private data */
1507 union ip_conntrack_expect_help {
1509 struct ip_ct_irc_expect exp_irc_info;
1510 struct ip_ct_pptp_expect exp_pptp_info;
1511 struct ip_ct_h225_expect exp_h225_info;
1512 + struct ip_ct_rtsp_expect exp_rtsp_info;
1514 #ifdef CONFIG_IP_NF_NAT_NEEDED
1517 struct ip_ct_irc_master ct_irc_info;
1518 struct ip_ct_pptp_master ct_pptp_info;
1519 struct ip_ct_h225_master ct_h225_info;
1520 + struct ip_ct_rtsp_master ct_rtsp_info;
1523 #ifdef CONFIG_IP_NF_NAT_NEEDED