aboutsummaryrefslogtreecommitdiffstats
path: root/net/key/af_key.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-24 00:02:38 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-24 02:07:37 -0500
commit214e005bc32c7045b8554f9f0fb07b3fcce2cd42 (patch)
tree19549e83718646b6ec942f9c4aaf8ce5645cb0d0 /net/key/af_key.c
parent55ae22d08fc9b531bc8a88b7306004e7053bb425 (diff)
xfrm: Pass km_event pointers around as const when possible.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r--net/key/af_key.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 60fd2f13f427..7c5e101e7c28 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1429,7 +1429,7 @@ static inline int event2keytype(int event)
1429} 1429}
1430 1430
1431/* ADD/UPD/DEL */ 1431/* ADD/UPD/DEL */
1432static int key_notify_sa(struct xfrm_state *x, struct km_event *c) 1432static int key_notify_sa(struct xfrm_state *x, const struct km_event *c)
1433{ 1433{
1434 struct sk_buff *skb; 1434 struct sk_buff *skb;
1435 struct sadb_msg *hdr; 1435 struct sadb_msg *hdr;
@@ -1688,7 +1688,7 @@ static int unicast_flush_resp(struct sock *sk, struct sadb_msg *ihdr)
1688 return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ONE, sk, sock_net(sk)); 1688 return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ONE, sk, sock_net(sk));
1689} 1689}
1690 1690
1691static int key_notify_sa_flush(struct km_event *c) 1691static int key_notify_sa_flush(const struct km_event *c)
1692{ 1692{
1693 struct sk_buff *skb; 1693 struct sk_buff *skb;
1694 struct sadb_msg *hdr; 1694 struct sadb_msg *hdr;
@@ -2123,7 +2123,7 @@ static int pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, in
2123 return 0; 2123 return 0;
2124} 2124}
2125 2125
2126static int key_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c) 2126static int key_notify_policy(struct xfrm_policy *xp, int dir, const struct km_event *c)
2127{ 2127{
2128 struct sk_buff *out_skb; 2128 struct sk_buff *out_skb;
2129 struct sadb_msg *out_hdr; 2129 struct sadb_msg *out_hdr;
@@ -2660,7 +2660,7 @@ static int pfkey_spddump(struct sock *sk, struct sk_buff *skb, struct sadb_msg *
2660 return pfkey_do_dump(pfk); 2660 return pfkey_do_dump(pfk);
2661} 2661}
2662 2662
2663static int key_notify_policy_flush(struct km_event *c) 2663static int key_notify_policy_flush(const struct km_event *c)
2664{ 2664{
2665 struct sk_buff *skb_out; 2665 struct sk_buff *skb_out;
2666 struct sadb_msg *hdr; 2666 struct sadb_msg *hdr;
@@ -2914,12 +2914,12 @@ static void dump_esp_combs(struct sk_buff *skb, struct xfrm_tmpl *t)
2914 } 2914 }
2915} 2915}
2916 2916
2917static int key_notify_policy_expire(struct xfrm_policy *xp, struct km_event *c) 2917static int key_notify_policy_expire(struct xfrm_policy *xp, const struct km_event *c)
2918{ 2918{
2919 return 0; 2919 return 0;
2920} 2920}
2921 2921
2922static int key_notify_sa_expire(struct xfrm_state *x, struct km_event *c) 2922static int key_notify_sa_expire(struct xfrm_state *x, const struct km_event *c)
2923{ 2923{
2924 struct sk_buff *out_skb; 2924 struct sk_buff *out_skb;
2925 struct sadb_msg *out_hdr; 2925 struct sadb_msg *out_hdr;
@@ -2949,7 +2949,7 @@ static int key_notify_sa_expire(struct xfrm_state *x, struct km_event *c)
2949 return 0; 2949 return 0;
2950} 2950}
2951 2951
2952static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c) 2952static int pfkey_send_notify(struct xfrm_state *x, const struct km_event *c)
2953{ 2953{
2954 struct net *net = x ? xs_net(x) : c->net; 2954 struct net *net = x ? xs_net(x) : c->net;
2955 struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id); 2955 struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
@@ -2976,7 +2976,7 @@ static int pfkey_send_notify(struct xfrm_state *x, struct km_event *c)
2976 return 0; 2976 return 0;
2977} 2977}
2978 2978
2979static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, struct km_event *c) 2979static int pfkey_send_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c)
2980{ 2980{
2981 if (xp && xp->type != XFRM_POLICY_TYPE_MAIN) 2981 if (xp && xp->type != XFRM_POLICY_TYPE_MAIN)
2982 return 0; 2982 return 0;