Re: [PATCH 1/1] net: delete stale packet_mclist entries
From: David Miller
Date: Mon Mar 09 2015 - 16:18:20 EST
From: fruggeri@xxxxxxxxxxxxxxxxxx (Francesco Ruggeri)
Date: Mon, 09 Mar 2015 12:09:52 -0700
> From ce9a4f202723f6ba1b18bc7c4a258c130c1f4148 Mon Sep 17 00:00:00 2001
> From: Francesco Ruggeri <fruggeri@xxxxxxxxxx>
> Date: Mon, 9 Mar 2015 11:51:04 -0700
> Subject: [PATCH 1/1] net: delete stale packet_mclist entries
> When an interface is deleted from a net namespace the ifindex in the
> corresponding entries in PF_PACKET sockets' mclists becomes stale.
> This can create inconsistencies if later an interface with the same ifindex
> is moved from a different namespace (not that unlikely since ifindexes are
> In particular we saw problems with dev->promiscuity, resulting
> in "promiscuity touches roof, set promiscuity failed. promiscuity
> feature of device might be broken" warnings and EOVERFLOW failures of
> This patch deletes the mclist entries for interfaces that are deleted.
> Since this now causes setsockopt(PACKET_DROP_MEMBERSHIP) to fail with
> EADDRNOTAVAIL if called after the interface is deleted, also make
> packet_mc_drop not fail.
> Signed-off-by: Francesco Ruggeri <fruggeri@xxxxxxxxxx>
Indeed, this is consistent with how we will fail an add of an MC list
entry if the ifindex doesn't resolve to an actual device.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/