twx-linux/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
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_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
nf_conntrack_h323.h
nf_conntrack_irc.h
nf_conntrack_pptp.h
nf_conntrack_proto_gre.h
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
nf_conntrack_tcp.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nf_conntrack_tftp.h
nfnetlink_acct.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
nfnetlink.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_hashlimit.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
xt_HMARK.h
xt_physdev.h UAPI: (Scripted) Disintegrate include/linux/netfilter 2012-10-09 09:48:54 +01:00
xt_rpfilter.h