xfrm: Const'ify xfrm_address_t args to xfrm_state_find.
authorDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 06:55:45 +0000 (01:55 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 07:08:47 +0000 (23:08 -0800)
This required a const'ification in xfrm_init_tempstate() too.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/xfrm/xfrm_state.c

index 3205e5e4379fc366ba6fca026bca9463eaad3c44..44dccfcf9204a7cb3a358da9a314e5f77e3d0d06 100644 (file)
@@ -1334,8 +1334,8 @@ extern int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
                           int (*func)(struct xfrm_state *, int, void*), void *);
 extern void xfrm_state_walk_done(struct xfrm_state_walk *walk);
 extern struct xfrm_state *xfrm_state_alloc(struct net *net);
-extern struct xfrm_state *xfrm_state_find(xfrm_address_t *daddr,
-                                         xfrm_address_t *saddr, 
+extern struct xfrm_state *xfrm_state_find(const xfrm_address_t *daddr,
+                                         const xfrm_address_t *saddr,
                                          const struct flowi *fl,
                                          struct xfrm_tmpl *tmpl,
                                          struct xfrm_policy *pol, int *err,
index 9d9ac7ca3dd468edafc4ad97f3e459bc515d9fe9..8496b3d3e85b5487a900e3226adebf8eeae01814 100644 (file)
@@ -659,7 +659,7 @@ EXPORT_SYMBOL(xfrm_sad_getinfo);
 static int
 xfrm_init_tempstate(struct xfrm_state *x, const struct flowi *fl,
                    const struct xfrm_tmpl *tmpl,
-                   xfrm_address_t *daddr, xfrm_address_t *saddr,
+                   const xfrm_address_t *daddr, const xfrm_address_t *saddr,
                    unsigned short family)
 {
        struct xfrm_state_afinfo *afinfo = xfrm_state_get_afinfo(family);
@@ -790,7 +790,7 @@ static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x,
 }
 
 struct xfrm_state *
-xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr,
+xfrm_state_find(const xfrm_address_t *daddr, const xfrm_address_t *saddr,
                const struct flowi *fl, struct xfrm_tmpl *tmpl,
                struct xfrm_policy *pol, int *err,
                unsigned short family)