diff options
-rw-r--r-- | include/net/ipv6.h | 13 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 10 |
2 files changed, 11 insertions, 12 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 81d4455f6e14..979bf6c13141 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -271,8 +271,17 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, | |||
271 | 271 | ||
272 | extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); | 272 | extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); |
273 | 273 | ||
274 | int ip6_frag_nqueues(struct net *net); | 274 | #if IS_ENABLED(CONFIG_IPV6) |
275 | int ip6_frag_mem(struct net *net); | 275 | static inline int ip6_frag_nqueues(struct net *net) |
276 | { | ||
277 | return net->ipv6.frags.nqueues; | ||
278 | } | ||
279 | |||
280 | static inline int ip6_frag_mem(struct net *net) | ||
281 | { | ||
282 | return atomic_read(&net->ipv6.frags.mem); | ||
283 | } | ||
284 | #endif | ||
276 | 285 | ||
277 | #define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */ | 286 | #define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */ |
278 | #define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */ | 287 | #define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */ |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 0ee553354ed5..cf74f4e79356 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -67,16 +67,6 @@ struct ip6frag_skb_cb | |||
67 | 67 | ||
68 | static struct inet_frags ip6_frags; | 68 | static struct inet_frags ip6_frags; |
69 | 69 | ||
70 | int ip6_frag_nqueues(struct net *net) | ||
71 | { | ||
72 | return net->ipv6.frags.nqueues; | ||
73 | } | ||
74 | |||
75 | int ip6_frag_mem(struct net *net) | ||
76 | { | ||
77 | return atomic_read(&net->ipv6.frags.mem); | ||
78 | } | ||
79 | |||
80 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, | 70 | static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, |
81 | struct net_device *dev); | 71 | struct net_device *dev); |
82 | 72 | ||