|
@@ -1183,6 +1183,17 @@ static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct)
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+static int tcp_nlattr_size(void)
|
|
|
+{
|
|
|
+ return nla_total_size(0) /* CTA_PROTOINFO_TCP */
|
|
|
+ + nla_policy_len(tcp_nla_policy, CTA_PROTOINFO_TCP_MAX + 1);
|
|
|
+}
|
|
|
+
|
|
|
+static int tcp_nlattr_tuple_size(void)
|
|
|
+{
|
|
|
+ return nla_policy_len(nf_ct_port_nla_policy, CTA_PROTO_MAX + 1);
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_SYSCTL
|
|
@@ -1398,9 +1409,11 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 __read_mostly =
|
|
|
.error = tcp_error,
|
|
|
#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
|
|
|
.to_nlattr = tcp_to_nlattr,
|
|
|
+ .nlattr_size = tcp_nlattr_size,
|
|
|
.from_nlattr = nlattr_to_tcp,
|
|
|
.tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
|
|
|
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
|
|
|
+ .nlattr_tuple_size = tcp_nlattr_tuple_size,
|
|
|
.nla_policy = nf_ct_port_nla_policy,
|
|
|
#endif
|
|
|
#ifdef CONFIG_SYSCTL
|
|
@@ -1428,9 +1441,11 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 __read_mostly =
|
|
|
.error = tcp_error,
|
|
|
#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
|
|
|
.to_nlattr = tcp_to_nlattr,
|
|
|
+ .nlattr_size = tcp_nlattr_size,
|
|
|
.from_nlattr = nlattr_to_tcp,
|
|
|
.tuple_to_nlattr = nf_ct_port_tuple_to_nlattr,
|
|
|
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
|
|
|
+ .nlattr_tuple_size = tcp_nlattr_tuple_size,
|
|
|
.nla_policy = nf_ct_port_nla_policy,
|
|
|
#endif
|
|
|
#ifdef CONFIG_SYSCTL
|