netfilter: nf_conntrack: add generic function to get len of generic policy
Usefull for all protocols which do not add additional data, such as GRE or UDPlite. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
committed by
Patrick McHardy
parent
2732c4e45b
commit
5c0de29d06
@@ -113,6 +113,7 @@ extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
|
|||||||
const struct nf_conntrack_tuple *tuple);
|
const struct nf_conntrack_tuple *tuple);
|
||||||
extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
|
extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
|
||||||
struct nf_conntrack_tuple *t);
|
struct nf_conntrack_tuple *t);
|
||||||
|
extern int nf_ct_port_nlattr_tuple_size(void);
|
||||||
extern const struct nla_policy nf_ct_port_nla_policy[];
|
extern const struct nla_policy nf_ct_port_nla_policy[];
|
||||||
|
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
|
@@ -921,6 +921,12 @@ int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple);
|
EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_to_tuple);
|
||||||
|
|
||||||
|
int nf_ct_port_nlattr_tuple_size(void)
|
||||||
|
{
|
||||||
|
return nla_policy_len(nf_ct_port_nla_policy, CTA_PROTO_MAX + 1);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(nf_ct_port_nlattr_tuple_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used by ipt_REJECT and ip6t_REJECT. */
|
/* Used by ipt_REJECT and ip6t_REJECT. */
|
||||||
|
Reference in New Issue
Block a user