net/if_clone: Panic if the same cloner is attached twice
authorMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Mon, 10 Nov 2014 10:21:46 +0000 (10:21 +0000)
committerMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Mon, 10 Nov 2014 10:42:16 +0000 (10:42 +0000)
commit51edabe8443f84c07c3bc5499445c984035af8ea
treef99080e223af277fc669b34c73da12d11c10c84a
parent9f304137a258f70a87e6aa6da3343a6654c2673f
net/if_clone: Panic if the same cloner is attached twice

if_clone_attach used to allow attaching the same cloner twice,
which then lead to infinite loops when trying to create
a clone with an invalid name.
This patch adds a check whether the cloner is already
attached, and if so, panics.
sys/net/if_clone.c