linux/net
Jeff Mahoney 4e7dba99c9 netfilter: Implement RFC 1123 for FTP conntrack
The FTP conntrack code currently only accepts the following format for
 the 227 response for PASV:
 227 Entering Passive Mode (148,100,81,40,31,161).

 It doesn't accept the following format from an obscure server:
 227 Data transfer will passively listen to 67,218,99,134,50,144

 From RFC 1123:
 The format of the 227 reply to a PASV command is not
 well standardized.  In particular, an FTP client cannot
 assume that the parentheses shown on page 40 of RFC-959
 will be present (and in fact, Figure 3 on page 43 omits
 them).  Therefore, a User-FTP program that interprets
 the PASV reply must scan the reply for the first digit
 of the host and port numbers.

 This patch adds support for the RFC 1123 clarification by:
 - Allowing a search filter to specify NUL as the terminator so that
   try_number will return successfully if the array of numbers has been
   filled when an unexpected character is encountered.
 - Using space as the separator for the 227 reply and then scanning for
   the first digit of the number sequence. The number sequence is parsed
   out using the existing try_rfc959 but with a NUL terminator.

References: https://bugzilla.novell.com/show_bug.cgi?id=466279
References: http://bugzilla.netfilter.org/show_bug.cgi?id=574
Reported-by: Mark Post <mpost@novell.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netfilter-devel@vger.kernel.org
Cc: netfilter@vger.kernel.org
Cc: coreteam@netfilter.org
Cc: netdev@vger.kernel.org
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2013-05-27 13:32:43 +02:00
..
9p Lots of virtio work which wasn't quite ready for last merge window. Plus 2013-05-02 14:14:04 -07:00
802
8021q net: vlan,ethtool: netdev_features_t is more than 32 bit 2013-05-02 13:58:12 -04:00
appletalk
atm
ax25
batman-adv batman-adv: reorder clean up routine in order to avoid race conditions 2013-05-09 12:39:45 +02:00
bluetooth
bridge netfilter: {ipt,ebt}_ULOG: rise warning on deprecation 2013-05-23 14:23:16 +02:00
caif
can
ceph libceph: use slab cache for osd client requests 2013-05-02 11:58:41 -05:00
core net: Loosen constraints for recalculating checksum in skb_segment() 2013-05-22 15:06:13 -07:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
ieee802154
ipv4 netfilter: {ipt,ebt}_ULOG: rise warning on deprecation 2013-05-23 14:23:16 +02:00
ipv6 ipv6: use ipv6_addr_scope() helper 2013-05-23 01:17:47 -07:00
ipx
irda
iucv
key
l2tp
lapb
llc
mac80211
mac802154
netfilter netfilter: Implement RFC 1123 for FTP conntrack 2013-05-27 13:32:43 +02:00
netlabel
netlink
netrom
nfc
openvswitch
packet packet: tpacket_v3: do not trigger bug() on wrong header status 2013-05-03 16:10:33 -04:00
phonet
rds
rfkill
rose
rxrpc
sched sch_tbf: segment too big GSO packets 2013-05-23 00:06:40 -07:00
sctp
sunrpc Merge branch 'for-3.10' of git://linux-nfs.org/~bfields/linux 2013-05-10 09:28:55 -07:00
tipc tipc: potential divide by zero in tipc_link_recv_fragment() 2013-05-06 16:16:52 -04:00
unix
vmw_vsock
wimax
wireless
x25
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-05-02 14:53:12 -07:00
compat.c
Kconfig rps: selective flow shedding during softnet overflow 2013-05-20 13:48:04 -07:00
Makefile
nonet.c
socket.c netfilter: don't panic on error while walking through the init path 2013-05-23 14:22:30 +02:00
sysctl_net.c