Skip to content

Commit 66fce3c

Browse files
committed
Add support to get namespace from a given lunatik state
1 parent e7cc807 commit 66fce3c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lunatik.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
struct lunatik_instance {
2929
struct hlist_head states_table[LUNATIK_HASH_BUCKETS];
3030
struct reply_buffer reply_buffer;
31+
struct net namespace;
3132
spinlock_t statestable_lock;
3233
spinlock_t rfcnt_lock;
3334
spinlock_t sendmessage_lock;

lunatik_core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ static int __net_init lunatik_instancenew(struct net *net)
205205
spin_lock_init(&(instance->rfcnt_lock));
206206
hash_init(instance->states_table);
207207
(instance->reply_buffer).status = RB_INIT;
208+
instance->namespace = *net;
208209
return 0;
209210
}
210211

0 commit comments

Comments
 (0)