w1: reply only to the requester portid

Unicast one wire replies back to the sender portid to avoid multiple
programs getting each other's messages, especially as the response
can't be uniquely identified with the sequence coming from the
requesting program when both programs generate the same id.  Continue
to broadcast events such as add/remove master/slave devices.

Signed-off-by: David Fries <David@Fries.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
David Fries
2014-01-15 22:29:20 -06:00
committed by Greg Kroah-Hartman
parent ac8f73305e
commit 5dbf5671c7
2 changed files with 30 additions and 17 deletions

View File

@@ -210,6 +210,11 @@ struct w1_master
struct w1_bus_master *bus_master;
u32 seq;
/* port id to send netlink responses to. The value is temporarily
* stored here while processing a message, set after locking the
* mutex, zero before unlocking the mutex.
*/
u32 portid;
};
/**