Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled

Randy reported when CONFIG_PROC_FS is not enabled:
ld: net/ipv4/af_inet.o: in function `inet_init':
af_inet.c:(.init.text+0x42d): undefined reference to `raw_init'

Fix by moving the endif up to the end of the proc entries

Fixes: 6897445fb194c ("net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mike Manning <mmanning@vyatta.att-mail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Ahern and committed by
David S. Miller
86d1d8b7 2c30aac5

+1 -1
+1 -1
net/ipv4/raw.c
··· 1132 1132 { 1133 1133 unregister_pernet_subsys(&raw_net_ops); 1134 1134 } 1135 + #endif /* CONFIG_PROC_FS */ 1135 1136 1136 1137 static void raw_sysctl_init_net(struct net *net) 1137 1138 { ··· 1157 1156 if (register_pernet_subsys(&raw_sysctl_ops)) 1158 1157 panic("RAW: failed to init sysctl parameters.\n"); 1159 1158 } 1160 - #endif /* CONFIG_PROC_FS */