From: Patrick McHardy Date: Wed, 26 Mar 2008 03:22:53 +0000 (-0700) Subject: [NETFILTER]: nf_conntrack_sip: process ACK and PRACK methods X-Git-Tag: v2.6.26-rc1~1138^2~328 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=595a8ecb5fa41295a7010678b60cb2f7ab15fe42;p=linux-2.6 [NETFILTER]: nf_conntrack_sip: process ACK and PRACK methods Both may contains SDP offers/answers. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 29a37d2126..71f744ad76 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c @@ -624,9 +624,22 @@ static int process_update_response(struct sk_buff *skb, return NF_ACCEPT; } +static int process_prack_response(struct sk_buff *skb, + const char **dptr, unsigned int *datalen, + unsigned int cseq, unsigned int code) +{ + if ((code >= 100 && code <= 199) || + (code >= 200 && code <= 299)) + return process_sdp(skb, dptr, datalen, cseq); + + return NF_ACCEPT; +} + static const struct sip_handler sip_handlers[] = { SIP_HANDLER("INVITE", process_sdp, process_invite_response), SIP_HANDLER("UPDATE", process_sdp, process_update_response), + SIP_HANDLER("ACK", process_sdp, NULL), + SIP_HANDLER("PRACK", process_sdp, process_prack_response), }; static int process_sip_response(struct sk_buff *skb,