aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-02-24 00:28:01 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-24 02:07:41 -0500
commit183cad12785ffc036571c4b789dc084ec61a1bad (patch)
tree85cdd5f0952b9404c24dcfae77f2f2158e19c8ad /net/key
parentdd701754e7d230330adc0e212b94106bbfd34841 (diff)
xfrm: Const'ify pointer args to km_migrate() and implementations.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7c5e101e7c28..56372853142a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -690,7 +690,7 @@ static inline int pfkey_mode_to_xfrm(int mode)
690 } 690 }
691} 691}
692 692
693static unsigned int pfkey_sockaddr_fill(xfrm_address_t *xaddr, __be16 port, 693static unsigned int pfkey_sockaddr_fill(const xfrm_address_t *xaddr, __be16 port,
694 struct sockaddr *sa, 694 struct sockaddr *sa,
695 unsigned short family) 695 unsigned short family)
696{ 696{
@@ -3318,7 +3318,7 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
3318 3318
3319#ifdef CONFIG_NET_KEY_MIGRATE 3319#ifdef CONFIG_NET_KEY_MIGRATE
3320static int set_sadb_address(struct sk_buff *skb, int sasize, int type, 3320static int set_sadb_address(struct sk_buff *skb, int sasize, int type,
3321 struct xfrm_selector *sel) 3321 const struct xfrm_selector *sel)
3322{ 3322{
3323 struct sadb_address *addr; 3323 struct sadb_address *addr;
3324 addr = (struct sadb_address *)skb_put(skb, sizeof(struct sadb_address) + sasize); 3324 addr = (struct sadb_address *)skb_put(skb, sizeof(struct sadb_address) + sasize);
@@ -3348,7 +3348,7 @@ static int set_sadb_address(struct sk_buff *skb, int sasize, int type,
3348} 3348}
3349 3349
3350 3350
3351static int set_sadb_kmaddress(struct sk_buff *skb, struct xfrm_kmaddress *k) 3351static int set_sadb_kmaddress(struct sk_buff *skb, const struct xfrm_kmaddress *k)
3352{ 3352{
3353 struct sadb_x_kmaddress *kma; 3353 struct sadb_x_kmaddress *kma;
3354 u8 *sa; 3354 u8 *sa;
@@ -3376,7 +3376,7 @@ static int set_sadb_kmaddress(struct sk_buff *skb, struct xfrm_kmaddress *k)
3376static int set_ipsecrequest(struct sk_buff *skb, 3376static int set_ipsecrequest(struct sk_buff *skb,
3377 uint8_t proto, uint8_t mode, int level, 3377 uint8_t proto, uint8_t mode, int level,
3378 uint32_t reqid, uint8_t family, 3378 uint32_t reqid, uint8_t family,
3379 xfrm_address_t *src, xfrm_address_t *dst) 3379 const xfrm_address_t *src, const xfrm_address_t *dst)
3380{ 3380{
3381 struct sadb_x_ipsecrequest *rq; 3381 struct sadb_x_ipsecrequest *rq;
3382 u8 *sa; 3382 u8 *sa;
@@ -3404,9 +3404,9 @@ static int set_ipsecrequest(struct sk_buff *skb,
3404#endif 3404#endif
3405 3405
3406#ifdef CONFIG_NET_KEY_MIGRATE 3406#ifdef CONFIG_NET_KEY_MIGRATE
3407static int pfkey_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type, 3407static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
3408 struct xfrm_migrate *m, int num_bundles, 3408 const struct xfrm_migrate *m, int num_bundles,
3409 struct xfrm_kmaddress *k) 3409 const struct xfrm_kmaddress *k)
3410{ 3410{
3411 int i; 3411 int i;
3412 int sasize_sel; 3412 int sasize_sel;
@@ -3415,7 +3415,7 @@ static int pfkey_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
3415 struct sk_buff *skb; 3415 struct sk_buff *skb;
3416 struct sadb_msg *hdr; 3416 struct sadb_msg *hdr;
3417 struct sadb_x_policy *pol; 3417 struct sadb_x_policy *pol;
3418 struct xfrm_migrate *mp; 3418 const struct xfrm_migrate *mp;
3419 3419
3420 if (type != XFRM_POLICY_TYPE_MAIN) 3420 if (type != XFRM_POLICY_TYPE_MAIN)
3421 return 0; 3421 return 0;
@@ -3513,9 +3513,9 @@ err:
3513 return -EINVAL; 3513 return -EINVAL;
3514} 3514}
3515#else 3515#else
3516static int pfkey_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type, 3516static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
3517 struct xfrm_migrate *m, int num_bundles, 3517 const struct xfrm_migrate *m, int num_bundles,
3518 struct xfrm_kmaddress *k) 3518 const struct xfrm_kmaddress *k)
3519{ 3519{
3520 return -ENOPROTOOPT; 3520 return -ENOPROTOOPT;
3521} 3521}