Commit 19bd62441c36279ab33e311faebd357ef04ba344
1 parent
214e005bc3
Exists in
master
and in
39 other branches
xfrm: Const'ify tmpl and address arguments to ->init_temprop()
Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 3 changed files with 8 additions and 6 deletions Side-by-side Diff
include/net/xfrm.h
... | ... | @@ -302,8 +302,10 @@ |
302 | 302 | int (*init_flags)(struct xfrm_state *x); |
303 | 303 | void (*init_tempsel)(struct xfrm_selector *sel, |
304 | 304 | const struct flowi *fl); |
305 | - void (*init_temprop)(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | |
306 | - xfrm_address_t *daddr, xfrm_address_t *saddr); | |
305 | + void (*init_temprop)(struct xfrm_state *x, | |
306 | + const struct xfrm_tmpl *tmpl, | |
307 | + const xfrm_address_t *daddr, | |
308 | + const xfrm_address_t *saddr); | |
307 | 309 | int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n); |
308 | 310 | int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n); |
309 | 311 | int (*output)(struct sk_buff *skb); |
net/ipv4/xfrm4_state.c
... | ... | @@ -37,8 +37,8 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | static void |
40 | -xfrm4_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | |
41 | - xfrm_address_t *daddr, xfrm_address_t *saddr) | |
40 | +xfrm4_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, | |
41 | + const xfrm_address_t *daddr, const xfrm_address_t *saddr) | |
42 | 42 | { |
43 | 43 | x->id = tmpl->id; |
44 | 44 | if (x->id.daddr.a4 == 0) |
net/ipv6/xfrm6_state.c
... | ... | @@ -38,8 +38,8 @@ |
38 | 38 | } |
39 | 39 | |
40 | 40 | static void |
41 | -xfrm6_init_temprop(struct xfrm_state *x, struct xfrm_tmpl *tmpl, | |
42 | - xfrm_address_t *daddr, xfrm_address_t *saddr) | |
41 | +xfrm6_init_temprop(struct xfrm_state *x, const struct xfrm_tmpl *tmpl, | |
42 | + const xfrm_address_t *daddr, const xfrm_address_t *saddr) | |
43 | 43 | { |
44 | 44 | x->id = tmpl->id; |
45 | 45 | if (ipv6_addr_any((struct in6_addr*)&x->id.daddr)) |