diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-24 00:07:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-24 02:07:37 -0500 |
commit | 19bd62441c36279ab33e311faebd357ef04ba344 (patch) | |
tree | d9666f25d4212876d7feb0d75303ac246c8846ef | |
parent | 214e005bc32c7045b8554f9f0fb07b3fcce2cd42 (diff) |
xfrm: Const'ify tmpl and address arguments to ->init_temprop()
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/xfrm.h | 6 | ||||
-rw-r--r-- | net/ipv4/xfrm4_state.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_state.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 6ef5c374ef8..46f44703b61 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -302,8 +302,10 @@ struct xfrm_state_afinfo { | |||
302 | int (*init_flags)(struct xfrm_state *x); | 302 | int (*init_flags)(struct xfrm_state *x); |
303 | void (*init_tempsel)(struct xfrm_selector *sel, | 303 | void (*init_tempsel)(struct xfrm_selector *sel, |
304 | const struct flowi *fl); | 304 | const struct flowi *fl); |
305 | void (*init_temprop)(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | 305 | void (*init_temprop)(struct xfrm_state *x, |
306 | xfrm_address_t *daddr, xfrm_address_t *saddr); | 306 | const struct xfrm_tmpl *tmpl, |
307 | const xfrm_address_t *daddr, | ||
308 | const xfrm_address_t *saddr); | ||
307 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); | 309 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); |
308 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); | 310 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); |
309 | int (*output)(struct sk_buff *skb); | 311 | int (*output)(struct sk_buff *skb); |
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c index 19eb5606772..983eff24898 100644 --- a/net/ipv4/xfrm4_state.c +++ b/net/ipv4/xfrm4_state.c | |||
@@ -37,8 +37,8 @@ __xfrm4_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | static void | 39 | static void |
40 | xfrm4_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | 40 | xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, |
41 | xfrm_address_t *daddr, xfrm_address_t *saddr) | 41 | const xfrm_address_t *daddr, const xfrm_address_t *saddr) |
42 | { | 42 | { |
43 | x->id = tmpl->id; | 43 | x->id = tmpl->id; |
44 | if (x->id.daddr.a4 == 0) | 44 | if (x->id.daddr.a4 == 0) |
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index 68a14c0339d..a02598e0079 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c | |||
@@ -38,8 +38,8 @@ __xfrm6_init_tempsel(struct xfrm_selector *sel, const struct flowi *fl) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | static void | 40 | static void |
41 | xfrm6_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | 41 | xfrm6_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, |
42 | xfrm_address_t *daddr, xfrm_address_t *saddr) | 42 | const xfrm_address_t *daddr, const xfrm_address_t *saddr) |
43 | { | 43 | { |
44 | x->id = tmpl->id; | 44 | x->id = tmpl->id; |
45 | if (ipv6_addr_any((struct in6_addr*)&x->id.daddr)) | 45 | if (ipv6_addr_any((struct in6_addr*)&x->id.daddr)) |