aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2013-02-24 08:10:27 -0500
committerSteffen Klassert <steffen.klassert@secunet.com>2013-03-06 01:02:46 -0500
commit05600a799f6c67b139f2bc565e358b913b230cf5 (patch)
tree795a039a2c5ab63590dbd151ff52d00637ef2ab8 /net/xfrm
parenta947b0a93efa9a25c012aa88848f4cf8d9b41280 (diff)
xfrm_user: constify netlink dispatch table
There is no need to modify the netlink dispatch table at runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 204cba192af8..aa778748c565 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2315,7 +2315,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
2315 [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 }, 2315 [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 },
2316}; 2316};
2317 2317
2318static struct xfrm_link { 2318static const struct xfrm_link {
2319 int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **); 2319 int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **);
2320 int (*dump)(struct sk_buff *, struct netlink_callback *); 2320 int (*dump)(struct sk_buff *, struct netlink_callback *);
2321 int (*done)(struct netlink_callback *); 2321 int (*done)(struct netlink_callback *);
@@ -2349,7 +2349,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
2349{ 2349{
2350 struct net *net = sock_net(skb->sk); 2350 struct net *net = sock_net(skb->sk);
2351 struct nlattr *attrs[XFRMA_MAX+1]; 2351 struct nlattr *attrs[XFRMA_MAX+1];
2352 struct xfrm_link *link; 2352 const struct xfrm_link *link;
2353 int type, err; 2353 int type, err;
2354 2354
2355 type = nlh->nlmsg_type; 2355 type = nlh->nlmsg_type;