@@ -45,7 +45,7 @@ struct xfrm_flo {
45
45
};
46
46
47
47
static DEFINE_SPINLOCK (xfrm_policy_afinfo_lock );
48
- static struct xfrm_policy_afinfo __rcu * xfrm_policy_afinfo [AF_INET6 + 1 ]
48
+ static struct xfrm_policy_afinfo const __rcu * xfrm_policy_afinfo [AF_INET6 + 1 ]
49
49
__read_mostly ;
50
50
51
51
static struct kmem_cache * xfrm_dst_cache __read_mostly ;
@@ -122,7 +122,7 @@ static inline struct dst_entry *__xfrm_dst_lookup(struct net *net,
122
122
const xfrm_address_t * daddr ,
123
123
int family )
124
124
{
125
- struct xfrm_policy_afinfo * afinfo ;
125
+ const struct xfrm_policy_afinfo * afinfo ;
126
126
struct dst_entry * dst ;
127
127
128
128
afinfo = xfrm_policy_get_afinfo (family );
@@ -1426,7 +1426,7 @@ xfrm_get_saddr(struct net *net, int oif, xfrm_address_t *local,
1426
1426
xfrm_address_t * remote , unsigned short family )
1427
1427
{
1428
1428
int err ;
1429
- struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
1429
+ const struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
1430
1430
1431
1431
if (unlikely (afinfo == NULL ))
1432
1432
return - EINVAL ;
@@ -1535,7 +1535,7 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl,
1535
1535
1536
1536
static int xfrm_get_tos (const struct flowi * fl , int family )
1537
1537
{
1538
- struct xfrm_policy_afinfo * afinfo ;
1538
+ const struct xfrm_policy_afinfo * afinfo ;
1539
1539
int tos = 0 ;
1540
1540
1541
1541
afinfo = xfrm_policy_get_afinfo (family );
@@ -1598,7 +1598,7 @@ static const struct flow_cache_ops xfrm_bundle_fc_ops = {
1598
1598
1599
1599
static inline struct xfrm_dst * xfrm_alloc_dst (struct net * net , int family )
1600
1600
{
1601
- struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
1601
+ const struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
1602
1602
struct dst_ops * dst_ops ;
1603
1603
struct xfrm_dst * xdst ;
1604
1604
@@ -1635,7 +1635,7 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family)
1635
1635
static inline int xfrm_init_path (struct xfrm_dst * path , struct dst_entry * dst ,
1636
1636
int nfheader_len )
1637
1637
{
1638
- struct xfrm_policy_afinfo * afinfo =
1638
+ const struct xfrm_policy_afinfo * afinfo =
1639
1639
xfrm_policy_get_afinfo (dst -> ops -> family );
1640
1640
int err ;
1641
1641
@@ -1652,7 +1652,7 @@ static inline int xfrm_init_path(struct xfrm_dst *path, struct dst_entry *dst,
1652
1652
static inline int xfrm_fill_dst (struct xfrm_dst * xdst , struct net_device * dev ,
1653
1653
const struct flowi * fl )
1654
1654
{
1655
- struct xfrm_policy_afinfo * afinfo =
1655
+ const struct xfrm_policy_afinfo * afinfo =
1656
1656
xfrm_policy_get_afinfo (xdst -> u .dst .ops -> family );
1657
1657
int err ;
1658
1658
@@ -2201,7 +2201,7 @@ xfrm_bundle_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir,
2201
2201
static struct dst_entry * make_blackhole (struct net * net , u16 family ,
2202
2202
struct dst_entry * dst_orig )
2203
2203
{
2204
- struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
2204
+ const struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
2205
2205
struct dst_entry * ret ;
2206
2206
2207
2207
if (!afinfo ) {
@@ -2452,7 +2452,7 @@ xfrm_policy_ok(const struct xfrm_tmpl *tmpl, const struct sec_path *sp, int star
2452
2452
int __xfrm_decode_session (struct sk_buff * skb , struct flowi * fl ,
2453
2453
unsigned int family , int reverse )
2454
2454
{
2455
- struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
2455
+ const struct xfrm_policy_afinfo * afinfo = xfrm_policy_get_afinfo (family );
2456
2456
int err ;
2457
2457
2458
2458
if (unlikely (afinfo == NULL ))
0 commit comments