summaryrefslogtreecommitdiffstats
path: root/net/sctp/primitive.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-04-03 12:02:37 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-03 18:36:31 +0200
commit576b7cd2f6ff1e90b3fc0a000d2fe74f8a50a4bb (patch)
treefe04eb71bfe9bd1fdafbe64586f379b989146f6c /net/sctp/primitive.c
parentRevert "netns: don't clear nsid too early on removal" (diff)
downloadlinux-576b7cd2f6ff1e90b3fc0a000d2fe74f8a50a4bb.tar.xz
linux-576b7cd2f6ff1e90b3fc0a000d2fe74f8a50a4bb.zip
netns: don't allocate an id for dead netns
First, let's explain the problem. Suppose you have an ipip interface that stands in the netns foo and its link part in the netns bar (so the netns bar has an nsid into the netns foo). Now, you remove the netns bar: - the bar nsid into the netns foo is removed - the netns exit method of ipip is called, thus our ipip iface is removed: => a netlink message is built in the netns foo to advertise this deletion => this netlink message requests an nsid for bar, thus a new nsid is allocated for bar and never removed. This patch adds a check in peernet2id() so that an id cannot be allocated for a netns which is currently destroyed. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/primitive.c')
0 files changed, 0 insertions, 0 deletions