From 5dbf5671c73f23c2dd7082c0a14da4e7e902983a Mon Sep 17 00:00:00 2001 From: David Fries Date: Wed, 15 Jan 2014 22:29:20 -0600 Subject: 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 Acked-by: Evgeniy Polyakov Signed-off-by: Greg Kroah-Hartman --- drivers/w1/w1.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/w1/w1.h') diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h index a096ef40119..390a7307fb4 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h @@ -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; }; /** -- cgit v1.2.3-70-g09d2