Skip to content

Commit 773daa3

Browse files
arndbdavem330
authored andcommitted
net: ipv4: avoid unused variable warning for sysctl
The newly introudced ip_min_valid_pmtu variable is only used when CONFIG_SYSCTL is set: net/ipv4/route.c:135:12: error: 'ip_min_valid_pmtu' defined but not used [-Werror=unused-variable] This moves it to the other variables like it, to avoid the harmless warning. Fixes: c7272c2 ("net: ipv4: don't allow setting net.ipv4.route.min_pmtu below 68") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b739012 commit 773daa3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ipv4/route.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ static int ip_rt_min_advmss __read_mostly = 256;
133133

134134
static int ip_rt_gc_timeout __read_mostly = RT_GC_TIMEOUT;
135135

136-
static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU;
137-
138136
/*
139137
* Interface to generic destination cache.
140138
*/
@@ -2821,6 +2819,7 @@ void ip_rt_multicast_event(struct in_device *in_dev)
28212819
static int ip_rt_gc_interval __read_mostly = 60 * HZ;
28222820
static int ip_rt_gc_min_interval __read_mostly = HZ / 2;
28232821
static int ip_rt_gc_elasticity __read_mostly = 8;
2822+
static int ip_min_valid_pmtu __read_mostly = IPV4_MIN_MTU;
28242823

28252824
static int ipv4_sysctl_rtcache_flush(struct ctl_table *__ctl, int write,
28262825
void __user *buffer,

0 commit comments

Comments
 (0)