ipvs: add ipv6 support to ftp
Add support for FTP commands with extended format (RFC 2428): - FTP EPRT: IPv4 and IPv6, active mode, similar to PORT - FTP EPSV: IPv4 and IPv6, passive mode, similar to PASV. EPSV response usually contains only port but we allow real server to provide different address We restrict control and data connection to be from same address family. Allow the "(" and ")" to be optional in PASV response. Also, add ipvsh argument to the pkt_in/pkt_out handlers to better access the payload after transport header. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
0cfceb9ff9
commit
d12e12299a
@@ -763,14 +763,14 @@ struct ip_vs_app {
|
||||
* 2=Mangled but checksum was not updated
|
||||
*/
|
||||
int (*pkt_out)(struct ip_vs_app *, struct ip_vs_conn *,
|
||||
struct sk_buff *, int *diff);
|
||||
struct sk_buff *, int *diff, struct ip_vs_iphdr *ipvsh);
|
||||
|
||||
/* input hook: Process packet in outin direction, diff set for TCP.
|
||||
* Return: 0=Error, 1=Payload Not Mangled/Mangled but checksum is ok,
|
||||
* 2=Mangled but checksum was not updated
|
||||
*/
|
||||
int (*pkt_in)(struct ip_vs_app *, struct ip_vs_conn *,
|
||||
struct sk_buff *, int *diff);
|
||||
struct sk_buff *, int *diff, struct ip_vs_iphdr *ipvsh);
|
||||
|
||||
/* ip_vs_app initializer */
|
||||
int (*init_conn)(struct ip_vs_app *, struct ip_vs_conn *);
|
||||
@@ -1328,8 +1328,10 @@ int register_ip_vs_app_inc(struct netns_ipvs *ipvs, struct ip_vs_app *app, __u16
|
||||
int ip_vs_app_inc_get(struct ip_vs_app *inc);
|
||||
void ip_vs_app_inc_put(struct ip_vs_app *inc);
|
||||
|
||||
int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb);
|
||||
int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb);
|
||||
int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb,
|
||||
struct ip_vs_iphdr *ipvsh);
|
||||
int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb,
|
||||
struct ip_vs_iphdr *ipvsh);
|
||||
|
||||
int register_ip_vs_pe(struct ip_vs_pe *pe);
|
||||
int unregister_ip_vs_pe(struct ip_vs_pe *pe);
|
||||
|
Reference in New Issue
Block a user