1
0
Fork 0
alistair23-linux/net/packet
Francesco Ruggeri 82f17091e6 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
per-namespace).
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
setsockopt(PACKET_ADD_MEMBERSHIP).
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@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-09 16:17:43 -04:00
..
Kconfig packet: Diag core and basic socket info dumping 2012-08-14 16:56:33 -07:00
Makefile packet: Diag core and basic socket info dumping 2012-08-14 16:56:33 -07:00
af_packet.c net: delete stale packet_mclist entries 2015-03-09 16:17:43 -04:00
diag.c netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
internal.h packet: handle too big packets for PACKET_V3 2014-08-21 16:44:28 -07:00