Skip to content

Commit a874752

Browse files
committed
netfilter: conntrack: timeout interface depend on CONFIG_NF_CONNTRACK_TIMEOUT
Now that cttimeout support for nft_ct is in place, these should depend on CONFIG_NF_CONNTRACK_TIMEOUT otherwise we can crash when dumping the policy if this option is not enabled. [ 71.600121] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [...] [ 71.600141] CPU: 3 PID: 7612 Comm: nft Not tainted 4.18.0+ #246 [...] [ 71.600188] Call Trace: [ 71.600201] ? nft_ct_timeout_obj_dump+0xc6/0xf0 [nft_ct] Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent f94e638 commit a874752

8 files changed

+45
-45
lines changed

net/netfilter/nf_conntrack_proto_dccp.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ static int nlattr_to_dccp(struct nlattr *cda[], struct nf_conn *ct)
675675
}
676676
#endif
677677

678-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
678+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
679679

680680
#include <linux/netfilter/nfnetlink.h>
681681
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -728,7 +728,7 @@ dccp_timeout_nla_policy[CTA_TIMEOUT_DCCP_MAX+1] = {
728728
[CTA_TIMEOUT_DCCP_CLOSING] = { .type = NLA_U32 },
729729
[CTA_TIMEOUT_DCCP_TIMEWAIT] = { .type = NLA_U32 },
730730
};
731-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
731+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
732732

733733
#ifdef CONFIG_SYSCTL
734734
/* template, data assigned later */
@@ -863,15 +863,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_dccp4 = {
863863
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
864864
.nla_policy = nf_ct_port_nla_policy,
865865
#endif
866-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
866+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
867867
.ctnl_timeout = {
868868
.nlattr_to_obj = dccp_timeout_nlattr_to_obj,
869869
.obj_to_nlattr = dccp_timeout_obj_to_nlattr,
870870
.nlattr_max = CTA_TIMEOUT_DCCP_MAX,
871871
.obj_size = sizeof(unsigned int) * CT_DCCP_MAX,
872872
.nla_policy = dccp_timeout_nla_policy,
873873
},
874-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
874+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
875875
.init_net = dccp_init_net,
876876
.get_net_proto = dccp_get_net_proto,
877877
};
@@ -896,15 +896,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_dccp6 = {
896896
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
897897
.nla_policy = nf_ct_port_nla_policy,
898898
#endif
899-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
899+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
900900
.ctnl_timeout = {
901901
.nlattr_to_obj = dccp_timeout_nlattr_to_obj,
902902
.obj_to_nlattr = dccp_timeout_obj_to_nlattr,
903903
.nlattr_max = CTA_TIMEOUT_DCCP_MAX,
904904
.obj_size = sizeof(unsigned int) * CT_DCCP_MAX,
905905
.nla_policy = dccp_timeout_nla_policy,
906906
},
907-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
907+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
908908
.init_net = dccp_init_net,
909909
.get_net_proto = dccp_get_net_proto,
910910
};

net/netfilter/nf_conntrack_proto_generic.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb,
7070
return ret;
7171
}
7272

73-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
73+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
7474

7575
#include <linux/netfilter/nfnetlink.h>
7676
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -113,7 +113,7 @@ static const struct nla_policy
113113
generic_timeout_nla_policy[CTA_TIMEOUT_GENERIC_MAX+1] = {
114114
[CTA_TIMEOUT_GENERIC_TIMEOUT] = { .type = NLA_U32 },
115115
};
116-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
116+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
117117

118118
#ifdef CONFIG_SYSCTL
119119
static struct ctl_table generic_sysctl_table[] = {
@@ -164,15 +164,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_generic =
164164
.pkt_to_tuple = generic_pkt_to_tuple,
165165
.packet = generic_packet,
166166
.new = generic_new,
167-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
167+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
168168
.ctnl_timeout = {
169169
.nlattr_to_obj = generic_timeout_nlattr_to_obj,
170170
.obj_to_nlattr = generic_timeout_obj_to_nlattr,
171171
.nlattr_max = CTA_TIMEOUT_GENERIC_MAX,
172172
.obj_size = sizeof(unsigned int),
173173
.nla_policy = generic_timeout_nla_policy,
174174
},
175-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
175+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
176176
.init_net = generic_init_net,
177177
.get_net_proto = generic_get_net_proto,
178178
};

net/netfilter/nf_conntrack_proto_gre.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static void gre_destroy(struct nf_conn *ct)
285285
nf_ct_gre_keymap_destroy(master);
286286
}
287287

288-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
288+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
289289

290290
#include <linux/netfilter/nfnetlink.h>
291291
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -334,7 +334,7 @@ gre_timeout_nla_policy[CTA_TIMEOUT_GRE_MAX+1] = {
334334
[CTA_TIMEOUT_GRE_UNREPLIED] = { .type = NLA_U32 },
335335
[CTA_TIMEOUT_GRE_REPLIED] = { .type = NLA_U32 },
336336
};
337-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
337+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
338338

339339
static int gre_init_net(struct net *net, u_int16_t proto)
340340
{
@@ -367,15 +367,15 @@ static const struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
367367
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
368368
.nla_policy = nf_ct_port_nla_policy,
369369
#endif
370-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
370+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
371371
.ctnl_timeout = {
372372
.nlattr_to_obj = gre_timeout_nlattr_to_obj,
373373
.obj_to_nlattr = gre_timeout_obj_to_nlattr,
374374
.nlattr_max = CTA_TIMEOUT_GRE_MAX,
375375
.obj_size = sizeof(unsigned int) * GRE_CT_MAX,
376376
.nla_policy = gre_timeout_nla_policy,
377377
},
378-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
378+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
379379
.net_id = &proto_gre_net_id,
380380
.init_net = gre_init_net,
381381
};

net/netfilter/nf_conntrack_proto_icmp.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static unsigned int icmp_nlattr_tuple_size(void)
273273
}
274274
#endif
275275

276-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
276+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
277277

278278
#include <linux/netfilter/nfnetlink.h>
279279
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -313,7 +313,7 @@ static const struct nla_policy
313313
icmp_timeout_nla_policy[CTA_TIMEOUT_ICMP_MAX+1] = {
314314
[CTA_TIMEOUT_ICMP_TIMEOUT] = { .type = NLA_U32 },
315315
};
316-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
316+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
317317

318318
#ifdef CONFIG_SYSCTL
319319
static struct ctl_table icmp_sysctl_table[] = {
@@ -374,15 +374,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp =
374374
.nlattr_to_tuple = icmp_nlattr_to_tuple,
375375
.nla_policy = icmp_nla_policy,
376376
#endif
377-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
377+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
378378
.ctnl_timeout = {
379379
.nlattr_to_obj = icmp_timeout_nlattr_to_obj,
380380
.obj_to_nlattr = icmp_timeout_obj_to_nlattr,
381381
.nlattr_max = CTA_TIMEOUT_ICMP_MAX,
382382
.obj_size = sizeof(unsigned int),
383383
.nla_policy = icmp_timeout_nla_policy,
384384
},
385-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
385+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
386386
.init_net = icmp_init_net,
387387
.get_net_proto = icmp_get_net_proto,
388388
};

net/netfilter/nf_conntrack_proto_icmpv6.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static unsigned int icmpv6_nlattr_tuple_size(void)
274274
}
275275
#endif
276276

277-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
277+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
278278

279279
#include <linux/netfilter/nfnetlink.h>
280280
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -314,7 +314,7 @@ static const struct nla_policy
314314
icmpv6_timeout_nla_policy[CTA_TIMEOUT_ICMPV6_MAX+1] = {
315315
[CTA_TIMEOUT_ICMPV6_TIMEOUT] = { .type = NLA_U32 },
316316
};
317-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
317+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
318318

319319
#ifdef CONFIG_SYSCTL
320320
static struct ctl_table icmpv6_sysctl_table[] = {
@@ -373,15 +373,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 =
373373
.nlattr_to_tuple = icmpv6_nlattr_to_tuple,
374374
.nla_policy = icmpv6_nla_policy,
375375
#endif
376-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
376+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
377377
.ctnl_timeout = {
378378
.nlattr_to_obj = icmpv6_timeout_nlattr_to_obj,
379379
.obj_to_nlattr = icmpv6_timeout_obj_to_nlattr,
380380
.nlattr_max = CTA_TIMEOUT_ICMP_MAX,
381381
.obj_size = sizeof(unsigned int),
382382
.nla_policy = icmpv6_timeout_nla_policy,
383383
},
384-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
384+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
385385
.init_net = icmpv6_init_net,
386386
.get_net_proto = icmpv6_get_net_proto,
387387
};

net/netfilter/nf_conntrack_proto_sctp.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int nlattr_to_sctp(struct nlattr *cda[], struct nf_conn *ct)
591591
}
592592
#endif
593593

594-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
594+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
595595

596596
#include <linux/netfilter/nfnetlink.h>
597597
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -646,7 +646,7 @@ sctp_timeout_nla_policy[CTA_TIMEOUT_SCTP_MAX+1] = {
646646
[CTA_TIMEOUT_SCTP_HEARTBEAT_SENT] = { .type = NLA_U32 },
647647
[CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED] = { .type = NLA_U32 },
648648
};
649-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
649+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
650650

651651

652652
#ifdef CONFIG_SYSCTL
@@ -780,15 +780,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 = {
780780
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
781781
.nla_policy = nf_ct_port_nla_policy,
782782
#endif
783-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
783+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
784784
.ctnl_timeout = {
785785
.nlattr_to_obj = sctp_timeout_nlattr_to_obj,
786786
.obj_to_nlattr = sctp_timeout_obj_to_nlattr,
787787
.nlattr_max = CTA_TIMEOUT_SCTP_MAX,
788788
.obj_size = sizeof(unsigned int) * SCTP_CONNTRACK_MAX,
789789
.nla_policy = sctp_timeout_nla_policy,
790790
},
791-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
791+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
792792
.init_net = sctp_init_net,
793793
.get_net_proto = sctp_get_net_proto,
794794
};
@@ -813,16 +813,16 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6 = {
813813
.nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
814814
.nlattr_to_tuple = nf_ct_port_nlattr_to_tuple,
815815
.nla_policy = nf_ct_port_nla_policy,
816-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
816+
#endif
817+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
817818
.ctnl_timeout = {
818819
.nlattr_to_obj = sctp_timeout_nlattr_to_obj,
819820
.obj_to_nlattr = sctp_timeout_obj_to_nlattr,
820821
.nlattr_max = CTA_TIMEOUT_SCTP_MAX,
821822
.obj_size = sizeof(unsigned int) * SCTP_CONNTRACK_MAX,
822823
.nla_policy = sctp_timeout_nla_policy,
823824
},
824-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
825-
#endif
825+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
826826
.init_net = sctp_init_net,
827827
.get_net_proto = sctp_get_net_proto,
828828
};

net/netfilter/nf_conntrack_proto_tcp.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ static unsigned int tcp_nlattr_tuple_size(void)
12791279
}
12801280
#endif
12811281

1282-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
1282+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
12831283

12841284
#include <linux/netfilter/nfnetlink.h>
12851285
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -1394,7 +1394,7 @@ static const struct nla_policy tcp_timeout_nla_policy[CTA_TIMEOUT_TCP_MAX+1] = {
13941394
[CTA_TIMEOUT_TCP_RETRANS] = { .type = NLA_U32 },
13951395
[CTA_TIMEOUT_TCP_UNACK] = { .type = NLA_U32 },
13961396
};
1397-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
1397+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
13981398

13991399
#ifdef CONFIG_SYSCTL
14001400
static struct ctl_table tcp_sysctl_table[] = {
@@ -1558,7 +1558,7 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 =
15581558
.nlattr_size = TCP_NLATTR_SIZE,
15591559
.nla_policy = nf_ct_port_nla_policy,
15601560
#endif
1561-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
1561+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
15621562
.ctnl_timeout = {
15631563
.nlattr_to_obj = tcp_timeout_nlattr_to_obj,
15641564
.obj_to_nlattr = tcp_timeout_obj_to_nlattr,
@@ -1567,7 +1567,7 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 =
15671567
TCP_CONNTRACK_TIMEOUT_MAX,
15681568
.nla_policy = tcp_timeout_nla_policy,
15691569
},
1570-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
1570+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
15711571
.init_net = tcp_init_net,
15721572
.get_net_proto = tcp_get_net_proto,
15731573
};
@@ -1593,7 +1593,7 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 =
15931593
.nlattr_tuple_size = tcp_nlattr_tuple_size,
15941594
.nla_policy = nf_ct_port_nla_policy,
15951595
#endif
1596-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
1596+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
15971597
.ctnl_timeout = {
15981598
.nlattr_to_obj = tcp_timeout_nlattr_to_obj,
15991599
.obj_to_nlattr = tcp_timeout_obj_to_nlattr,
@@ -1602,7 +1602,7 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 =
16021602
TCP_CONNTRACK_TIMEOUT_MAX,
16031603
.nla_policy = tcp_timeout_nla_policy,
16041604
},
1605-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
1605+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
16061606
.init_net = tcp_init_net,
16071607
.get_net_proto = tcp_get_net_proto,
16081608
};

net/netfilter/nf_conntrack_proto_udp.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static int udp_error(struct net *net, struct nf_conn *tmpl, struct sk_buff *skb,
171171
return NF_ACCEPT;
172172
}
173173

174-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
174+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
175175

176176
#include <linux/netfilter/nfnetlink.h>
177177
#include <linux/netfilter/nfnetlink_cttimeout.h>
@@ -221,7 +221,7 @@ udp_timeout_nla_policy[CTA_TIMEOUT_UDP_MAX+1] = {
221221
[CTA_TIMEOUT_UDP_UNREPLIED] = { .type = NLA_U32 },
222222
[CTA_TIMEOUT_UDP_REPLIED] = { .type = NLA_U32 },
223223
};
224-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
224+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
225225

226226
#ifdef CONFIG_SYSCTL
227227
static struct ctl_table udp_sysctl_table[] = {
@@ -292,15 +292,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 =
292292
.nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
293293
.nla_policy = nf_ct_port_nla_policy,
294294
#endif
295-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
295+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
296296
.ctnl_timeout = {
297297
.nlattr_to_obj = udp_timeout_nlattr_to_obj,
298298
.obj_to_nlattr = udp_timeout_obj_to_nlattr,
299299
.nlattr_max = CTA_TIMEOUT_UDP_MAX,
300300
.obj_size = sizeof(unsigned int) * CTA_TIMEOUT_UDP_MAX,
301301
.nla_policy = udp_timeout_nla_policy,
302302
},
303-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
303+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
304304
.init_net = udp_init_net,
305305
.get_net_proto = udp_get_net_proto,
306306
};
@@ -321,15 +321,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite4 =
321321
.nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
322322
.nla_policy = nf_ct_port_nla_policy,
323323
#endif
324-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
324+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
325325
.ctnl_timeout = {
326326
.nlattr_to_obj = udp_timeout_nlattr_to_obj,
327327
.obj_to_nlattr = udp_timeout_obj_to_nlattr,
328328
.nlattr_max = CTA_TIMEOUT_UDP_MAX,
329329
.obj_size = sizeof(unsigned int) * CTA_TIMEOUT_UDP_MAX,
330330
.nla_policy = udp_timeout_nla_policy,
331331
},
332-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
332+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
333333
.init_net = udp_init_net,
334334
.get_net_proto = udp_get_net_proto,
335335
};
@@ -350,15 +350,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6 =
350350
.nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
351351
.nla_policy = nf_ct_port_nla_policy,
352352
#endif
353-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
353+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
354354
.ctnl_timeout = {
355355
.nlattr_to_obj = udp_timeout_nlattr_to_obj,
356356
.obj_to_nlattr = udp_timeout_obj_to_nlattr,
357357
.nlattr_max = CTA_TIMEOUT_UDP_MAX,
358358
.obj_size = sizeof(unsigned int) * CTA_TIMEOUT_UDP_MAX,
359359
.nla_policy = udp_timeout_nla_policy,
360360
},
361-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
361+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
362362
.init_net = udp_init_net,
363363
.get_net_proto = udp_get_net_proto,
364364
};
@@ -379,15 +379,15 @@ const struct nf_conntrack_l4proto nf_conntrack_l4proto_udplite6 =
379379
.nlattr_tuple_size = nf_ct_port_nlattr_tuple_size,
380380
.nla_policy = nf_ct_port_nla_policy,
381381
#endif
382-
#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)
382+
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
383383
.ctnl_timeout = {
384384
.nlattr_to_obj = udp_timeout_nlattr_to_obj,
385385
.obj_to_nlattr = udp_timeout_obj_to_nlattr,
386386
.nlattr_max = CTA_TIMEOUT_UDP_MAX,
387387
.obj_size = sizeof(unsigned int) * CTA_TIMEOUT_UDP_MAX,
388388
.nla_policy = udp_timeout_nla_policy,
389389
},
390-
#endif /* CONFIG_NF_CT_NETLINK_TIMEOUT */
390+
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
391391
.init_net = udp_init_net,
392392
.get_net_proto = udp_get_net_proto,
393393
};

0 commit comments

Comments
 (0)