OSDN Git Service

xfrm: Const'ify address arguments to ->dst_lookup()
authorDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 05:14:45 +0000 (00:14 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Feb 2011 07:07:38 +0000 (23:07 -0800)
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_policy.c

index 567f08b..18f115a 100644 (file)
@@ -267,8 +267,8 @@ struct xfrm_policy_afinfo {
        struct dst_ops          *dst_ops;
        void                    (*garbage_collect)(struct net *net);
        struct dst_entry        *(*dst_lookup)(struct net *net, int tos,
-                                              xfrm_address_t *saddr,
-                                              xfrm_address_t *daddr);
+                                              const xfrm_address_t *saddr,
+                                              const xfrm_address_t *daddr);
        int                     (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr);
        void                    (*decode_session)(struct sk_buff *skb,
                                                  struct flowi *fl,
index 1e9844d..63aa88e 100644 (file)
@@ -19,8 +19,8 @@
 static struct xfrm_policy_afinfo xfrm4_policy_afinfo;
 
 static struct dst_entry *xfrm4_dst_lookup(struct net *net, int tos,
-                                         xfrm_address_t *saddr,
-                                         xfrm_address_t *daddr)
+                                         const xfrm_address_t *saddr,
+                                         const xfrm_address_t *daddr)
 {
        struct flowi fl = {
                .fl4_dst = daddr->a4,
index f2fa904..c128ca1 100644 (file)
@@ -27,8 +27,8 @@
 static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
 
 static struct dst_entry *xfrm6_dst_lookup(struct net *net, int tos,
-                                         xfrm_address_t *saddr,
-                                         xfrm_address_t *daddr)
+                                         const xfrm_address_t *saddr,
+                                         const xfrm_address_t *daddr)
 {
        struct flowi fl = {};
        struct dst_entry *dst;