aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-03-25 23:26:08 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-25 23:26:08 -0400
commit4ab9e64e5e3c0516577818804aaf13a630d67bc9 (patch)
tree70450c93e83f5038dc14da7614d669109e59a148 /include
parenta9c1d35917c0c95c8f95a8e497fb91e301419693 (diff)
[NETFILTER]: nf_nat_sip: split up SDP mangling
The SDP connection addresses may be contained in the payload multiple times (in the session description and/or once per media description), currently only the session description is properly updated. Split up SDP mangling so the function setting up expectations only updates the media port, update connection addresses from media descriptions while parsing them and at the end update the session description when the final addresses are known. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter/nf_conntrack_sip.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h
index 6ddf95f51fb5..eca3ad3f28dc 100644
--- a/include/linux/netfilter/nf_conntrack_sip.h
+++ b/include/linux/netfilter/nf_conntrack_sip.h
@@ -93,11 +93,26 @@ extern unsigned int (*nf_nat_sip_expect_hook)(struct sk_buff *skb,
93 struct nf_conntrack_expect *exp, 93 struct nf_conntrack_expect *exp,
94 unsigned int matchoff, 94 unsigned int matchoff,
95 unsigned int matchlen); 95 unsigned int matchlen);
96extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb, 96extern unsigned int (*nf_nat_sdp_addr_hook)(struct sk_buff *skb,
97 const char **dptr, 97 const char **dptr,
98 unsigned int *datalen, 98 unsigned int dataoff,
99 struct nf_conntrack_expect *rtp_exp, 99 unsigned int *datalen,
100 struct nf_conntrack_expect *rtcp_exp); 100 enum sdp_header_types type,
101 enum sdp_header_types term,
102 const union nf_inet_addr *addr);
103extern unsigned int (*nf_nat_sdp_session_hook)(struct sk_buff *skb,
104 const char **dptr,
105 unsigned int dataoff,
106 unsigned int *datalen,
107 const union nf_inet_addr *addr);
108extern unsigned int (*nf_nat_sdp_media_hook)(struct sk_buff *skb,
109 const char **dptr,
110 unsigned int *datalen,
111 struct nf_conntrack_expect *rtp_exp,
112 struct nf_conntrack_expect *rtcp_exp,
113 unsigned int mediaoff,
114 unsigned int medialen,
115 union nf_inet_addr *rtp_addr);
101 116
102extern int ct_sip_parse_request(const struct nf_conn *ct, 117extern int ct_sip_parse_request(const struct nf_conn *ct,
103 const char *dptr, unsigned int datalen, 118 const char *dptr, unsigned int datalen,