Skip to content

Commit

Permalink
IPVS: Turn off FTP application helper for IPv6
Browse files Browse the repository at this point in the history
Immediately return from FTP application helper and do nothing when dealing
with IPv6 packets. IPv6 is not supported by this helper yet.

Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
Julius Volz authored and Simon Horman committed Sep 5, 2008
1 parent c6883f5 commit a0eb662
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions net/ipv4/ipvs/ip_vs_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
unsigned buf_len;
int ret;

#ifdef CONFIG_IP_VS_IPV6
/* This application helper doesn't work with IPv6 yet,
* so turn this into a no-op for IPv6 packets
*/
if (cp->af == AF_INET6)
return 1;
#endif

*diff = 0;

/* Only useful for established sessions */
Expand Down Expand Up @@ -248,6 +256,14 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp,
__be16 port;
struct ip_vs_conn *n_cp;

#ifdef CONFIG_IP_VS_IPV6
/* This application helper doesn't work with IPv6 yet,
* so turn this into a no-op for IPv6 packets
*/
if (cp->af == AF_INET6)
return 1;
#endif

/* no diff required for incoming packets */
*diff = 0;

Expand Down

0 comments on commit a0eb662

Please sign in to comment.