]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ipmr: Define net->ipv4.{ipmr_notifier_ops,ipmr_seq} under CONFIG_IP_MROUTE.
authorKuniyuki Iwashima <kuniyu@google.com>
Sat, 28 Feb 2026 22:17:30 +0000 (22:17 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Mar 2026 02:49:41 +0000 (18:49 -0800)
net->ipv4.ipmr_notifier_ops and net->ipv4.ipmr_seq are used
only in net/ipv4/ipmr.c.

Let's move these definitions under CONFIG_IP_MROUTE.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260228221800.1082070-13-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netns/ipv4.h

index 8e971c7bf164642344f40a07e021b0037f27ee7d..380ff34c023320a37eb6d8e4d24b6018f8d565a1 100644 (file)
@@ -279,6 +279,8 @@ struct netns_ipv4 {
        struct list_head        mr_tables;
        struct fib_rules_ops    *mr_rules_ops;
 #endif
+       struct fib_notifier_ops *ipmr_notifier_ops;
+       unsigned int            ipmr_seq;       /* protected by rtnl_mutex */
 #endif
 #ifdef CONFIG_IP_ROUTE_MULTIPATH
        struct sysctl_fib_multipath_hash_seed sysctl_fib_multipath_hash_seed;
@@ -290,9 +292,6 @@ struct netns_ipv4 {
        struct fib_notifier_ops *notifier_ops;
        unsigned int    fib_seq;        /* writes protected by rtnl_mutex */
 
-       struct fib_notifier_ops *ipmr_notifier_ops;
-       unsigned int    ipmr_seq;       /* protected by rtnl_mutex */
-
        atomic_t        rt_genid;
        siphash_key_t   ip_id_key;
        struct hlist_head       *inet_addr_lst;