Re: use libiptc to build a rule to allow tftp traffic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I am trying to build a rule just like below:
iptables -t raw -I OUTPUT -j CT -p udp --dport 69 --helper tftp

Just can't figure out the CT target part.
I'm referring to xt_ct_target_info_v1 in xt_CT.h to construct the CT
target data structure.
For tftp helper, supposedly I should set the helper field to "tftp". Right?
struct xt_ct_target_info_v1 {
__u16 flags;
__u16 zone;
__u32 ct_events;
__u32 exp_events;
char helper[16];
char timeout[32];

/* Used internally by the kernel */
struct nf_conn *ct __attribute__((aligned(8)));
};


But I also find a "xt_helper.h" where it's like below:
Should I also add a match part using this xt_helper_info structure?

struct xt_helper_info {
int invert;
char name[30];
};

Thanks,
Moyuan



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux