summaryrefslogtreecommitdiffstats
path: root/include/net/lwtunnel.h
diff options
context:
space:
mode:
authorRobert Shearman <rshearma@brocade.com>2016-02-19 10:43:16 +0100
committerDavid S. Miller <davem@davemloft.net>2016-02-22 04:00:28 +0100
commit745041e2aaf1d668f293aaab4b0f6ad7daa056a5 (patch)
tree74e23fcbb1a49a34efe08a4cdb2fa3ea910c3123 /include/net/lwtunnel.h
parentvlan: turn on unicast filtering on vlan device (diff)
downloadlinux-745041e2aaf1d668f293aaab4b0f6ad7daa056a5.tar.xz
linux-745041e2aaf1d668f293aaab4b0f6ad7daa056a5.zip
lwtunnel: autoload of lwt modules
The lwt implementations using net devices can autoload using the existing mechanism using IFLA_INFO_KIND. However, there's no mechanism that lwt modules not using net devices can use. Therefore, add the ability to autoload modules registering lwt operations for lwt implementations not using a net device so that users don't have to manually load the modules. Only users with the CAP_NET_ADMIN capability can cause modules to be loaded, which is ensured by rtnetlink_rcv_msg rejecting non-RTM_GETxxx messages for users without this capability, and by lwtunnel_build_state not being called in response to RTM_GETxxx messages. Signed-off-by: Robert Shearman <rshearma@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/lwtunnel.h')
-rw-r--r--include/net/lwtunnel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h
index 66350ce3e955..e9f116e29c22 100644
--- a/include/net/lwtunnel.h
+++ b/include/net/lwtunnel.h
@@ -170,6 +170,8 @@ static inline int lwtunnel_input(struct sk_buff *skb)
return -EOPNOTSUPP;
}
-#endif
+#endif /* CONFIG_LWTUNNEL */
+
+#define MODULE_ALIAS_RTNL_LWT(encap_type) MODULE_ALIAS("rtnl-lwt-" __stringify(encap_type))
#endif /* __NET_LWTUNNEL_H */