diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-28 02:17:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 02:17:24 -0500 |
commit | a70486f0e669730bad6713063e3f59e2e870044f (patch) | |
tree | f502826e26c5605bb973c1cc0d7817074330e424 /net/xfrm | |
parent | 851586218f5d463bbd62af40dfa264c5e3539572 (diff) |
xfrm: Pass const xfrm_address_t objects to xfrm_state_lookup* and xfrm_find_acq.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_state.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 8496b3d3e85b..81221d9cbf06 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -997,7 +997,11 @@ void xfrm_state_insert(struct xfrm_state *x) | |||
997 | EXPORT_SYMBOL(xfrm_state_insert); | 997 | EXPORT_SYMBOL(xfrm_state_insert); |
998 | 998 | ||
999 | /* xfrm_state_lock is held */ | 999 | /* xfrm_state_lock is held */ |
1000 | static struct xfrm_state *__find_acq_core(struct net *net, struct xfrm_mark *m, unsigned short family, u8 mode, u32 reqid, u8 proto, xfrm_address_t *daddr, xfrm_address_t *saddr, int create) | 1000 | static struct xfrm_state *__find_acq_core(struct net *net, struct xfrm_mark *m, |
1001 | unsigned short family, u8 mode, | ||
1002 | u32 reqid, u8 proto, | ||
1003 | const xfrm_address_t *daddr, | ||
1004 | const xfrm_address_t *saddr, int create) | ||
1001 | { | 1005 | { |
1002 | unsigned int h = xfrm_dst_hash(net, daddr, saddr, reqid, family); | 1006 | unsigned int h = xfrm_dst_hash(net, daddr, saddr, reqid, family); |
1003 | struct hlist_node *entry; | 1007 | struct hlist_node *entry; |
@@ -1375,7 +1379,7 @@ int xfrm_state_check_expire(struct xfrm_state *x) | |||
1375 | EXPORT_SYMBOL(xfrm_state_check_expire); | 1379 | EXPORT_SYMBOL(xfrm_state_check_expire); |
1376 | 1380 | ||
1377 | struct xfrm_state * | 1381 | struct xfrm_state * |
1378 | xfrm_state_lookup(struct net *net, u32 mark, xfrm_address_t *daddr, __be32 spi, | 1382 | xfrm_state_lookup(struct net *net, u32 mark, const xfrm_address_t *daddr, __be32 spi, |
1379 | u8 proto, unsigned short family) | 1383 | u8 proto, unsigned short family) |
1380 | { | 1384 | { |
1381 | struct xfrm_state *x; | 1385 | struct xfrm_state *x; |
@@ -1389,7 +1393,7 @@ EXPORT_SYMBOL(xfrm_state_lookup); | |||
1389 | 1393 | ||
1390 | struct xfrm_state * | 1394 | struct xfrm_state * |
1391 | xfrm_state_lookup_byaddr(struct net *net, u32 mark, | 1395 | xfrm_state_lookup_byaddr(struct net *net, u32 mark, |
1392 | xfrm_address_t *daddr, xfrm_address_t *saddr, | 1396 | const xfrm_address_t *daddr, const xfrm_address_t *saddr, |
1393 | u8 proto, unsigned short family) | 1397 | u8 proto, unsigned short family) |
1394 | { | 1398 | { |
1395 | struct xfrm_state *x; | 1399 | struct xfrm_state *x; |
@@ -1403,7 +1407,7 @@ EXPORT_SYMBOL(xfrm_state_lookup_byaddr); | |||
1403 | 1407 | ||
1404 | struct xfrm_state * | 1408 | struct xfrm_state * |
1405 | xfrm_find_acq(struct net *net, struct xfrm_mark *mark, u8 mode, u32 reqid, u8 proto, | 1409 | xfrm_find_acq(struct net *net, struct xfrm_mark *mark, u8 mode, u32 reqid, u8 proto, |
1406 | xfrm_address_t *daddr, xfrm_address_t *saddr, | 1410 | const xfrm_address_t *daddr, const xfrm_address_t *saddr, |
1407 | int create, unsigned short family) | 1411 | int create, unsigned short family) |
1408 | { | 1412 | { |
1409 | struct xfrm_state *x; | 1413 | struct xfrm_state *x; |