linux-sg2042/include/linux/netfilter
Kevin Cernekee 7266507d89 netfilter: nf_ct_sip: support Cisco 7941/7945 IP phones
Most SIP devices use a source port of 5060/udp on SIP requests, so the
response automatically comes back to port 5060:

    phone_ip:5060 -> proxy_ip:5060   REGISTER
    proxy_ip:5060 -> phone_ip:5060   100 Trying

The newer Cisco IP phones, however, use a randomly chosen high source
port for the SIP request but expect the response on port 5060:

    phone_ip:49173 -> proxy_ip:5060  REGISTER
    proxy_ip:5060 -> phone_ip:5060   100 Trying

Standard Linux NAT, with or without nf_nat_sip, will send the reply back
to port 49173, not 5060:

    phone_ip:49173 -> proxy_ip:5060  REGISTER
    proxy_ip:5060 -> phone_ip:49173  100 Trying

But the phone is not listening on 49173, so it will never see the reply.

This patch modifies nf_*_sip to work around this quirk by extracting
the SIP response port from the Via: header, iff the source IP in the
packet header matches the source IP in the SIP request.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-01-17 21:12:44 +01:00
..
ipset UAPI: Remove empty non-UAPI Kbuild files 2012-10-17 12:31:15 +01:00
nf_conntrack_amanda.h netfilter: nf_nat: add protoff argument to packet mangling functions 2012-08-30 03:00:13 +02:00
nf_conntrack_common.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nf_conntrack_dccp.h
nf_conntrack_ftp.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nf_conntrack_h323.h netfilter: nf_nat: add protoff argument to packet mangling functions 2012-08-30 03:00:13 +02:00
nf_conntrack_h323_asn1.h UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers 2012-10-02 18:01:25 +01:00
nf_conntrack_h323_types.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
nf_conntrack_irc.h netfilter: nf_nat: add protoff argument to packet mangling functions 2012-08-30 03:00:13 +02:00
nf_conntrack_pptp.h netfilter: nf_nat: add protoff argument to packet mangling functions 2012-08-30 03:00:13 +02:00
nf_conntrack_proto_gre.h Fix common misspellings 2011-03-31 11:26:23 -03:00
nf_conntrack_sane.h
nf_conntrack_sip.h netfilter: nf_ct_sip: support Cisco 7941/7945 IP phones 2013-01-17 21:12:44 +01:00
nf_conntrack_snmp.h netfilter: nf_conntrack: nf_conntrack snmp helper 2011-01-18 18:12:24 +01:00
nf_conntrack_tcp.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nf_conntrack_tftp.h
nfnetlink.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nfnetlink_acct.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
x_tables.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
xt_HMARK.h netfilter: xt_HMARK: fix endianness and provide consistent hashing 2012-06-07 14:53:01 +02:00
xt_hashlimit.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
xt_physdev.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
xt_rpfilter.h netfilter: add ipv4 reverse path filter match 2011-12-04 22:43:37 +01:00