File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ struct netns_xfrm {
50
50
struct list_head policy_all ;
51
51
struct hlist_head * policy_byidx ;
52
52
unsigned int policy_idx_hmask ;
53
+ unsigned int idx_generator ;
53
54
struct hlist_head policy_inexact [XFRM_POLICY_MAX ];
54
55
struct xfrm_policy_hash policy_bydst [XFRM_POLICY_MAX ];
55
56
unsigned int policy_count [XFRM_POLICY_MAX * 2 ];
Original file line number Diff line number Diff line change @@ -1375,17 +1375,15 @@ EXPORT_SYMBOL(xfrm_policy_hash_rebuild);
1375
1375
* of an absolute inpredictability of ordering of rules. This will not pass. */
1376
1376
static u32 xfrm_gen_index (struct net * net , int dir , u32 index )
1377
1377
{
1378
- static u32 idx_generator ;
1379
-
1380
1378
for (;;) {
1381
1379
struct hlist_head * list ;
1382
1380
struct xfrm_policy * p ;
1383
1381
u32 idx ;
1384
1382
int found ;
1385
1383
1386
1384
if (!index ) {
1387
- idx = (idx_generator | dir );
1388
- idx_generator += 8 ;
1385
+ idx = (net -> xfrm . idx_generator | dir );
1386
+ net -> xfrm . idx_generator += 8 ;
1389
1387
} else {
1390
1388
idx = index ;
1391
1389
index = 0 ;
You can’t perform that action at this time.
0 commit comments