sctp: Make the address lists per network namespace
- Move the address lists into struct net - Add per network namespace initialization and cleanup - Pass around struct net so it is everywhere I need it. - Rename all of the global variable references into references to the variables moved into struct net Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4110cc255d
commit
4db67e8086
9 changed files with 132 additions and 103 deletions
21
include/net/netns/sctp.h
Normal file
21
include/net/netns/sctp.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef __NETNS_SCTP_H__
|
||||
#define __NETNS_SCTP_H__
|
||||
|
||||
struct netns_sctp {
|
||||
/* This is the global local address list.
|
||||
* We actively maintain this complete list of addresses on
|
||||
* the system by catching address add/delete events.
|
||||
*
|
||||
* It is a list of sctp_sockaddr_entry.
|
||||
*/
|
||||
struct list_head local_addr_list;
|
||||
struct list_head addr_waitq;
|
||||
struct timer_list addr_wq_timer;
|
||||
struct list_head auto_asconf_splist;
|
||||
spinlock_t addr_wq_lock;
|
||||
|
||||
/* Lock that protects the local_addr_list writers */
|
||||
spinlock_t local_addr_lock;
|
||||
};
|
||||
|
||||
#endif /* __NETNS_SCTP_H__ */
|
Loading…
Add table
Add a link
Reference in a new issue