Skip to content

Commit

Permalink
xfrm_user: constify netlink dispatch table
Browse files Browse the repository at this point in the history
There is no need to modify the netlink dispatch table at runtime.

Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
  • Loading branch information
minipli authored and klassert committed Mar 6, 2013
1 parent a947b0a commit 05600a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -2315,7 +2315,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
[XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 },
};

static struct xfrm_link {
static const struct xfrm_link {
int (*doit)(struct sk_buff *, struct nlmsghdr *, struct nlattr **);
int (*dump)(struct sk_buff *, struct netlink_callback *);
int (*done)(struct netlink_callback *);
Expand Down Expand Up @@ -2349,7 +2349,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{
struct net *net = sock_net(skb->sk);
struct nlattr *attrs[XFRMA_MAX+1];
struct xfrm_link *link;
const struct xfrm_link *link;
int type, err;

type = nlh->nlmsg_type;
Expand Down

0 comments on commit 05600a7

Please sign in to comment.