All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath()
@ 2014-11-04 15:14 Henning Rogge
  2014-11-04 15:37 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Rogge @ 2014-11-04 15:14 UTC (permalink / raw)
  To: linux-wireless @ vger . kernel . org; +Cc: Johannes Berg, Henning Rogge

Netlink command for nl80211_send_mpath() should be NL80211_CMD_NEW_MPATH.

Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cb9f5a4..7c20040 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4423,7 +4423,7 @@ static int nl80211_send_mpath(struct sk_buff *msg, u32 portid, u32 seq,
 	void *hdr;
 	struct nlattr *pinfoattr;
 
-	hdr = nl80211hdr_put(msg, portid, seq, flags, NL80211_CMD_NEW_STATION);
+	hdr = nl80211hdr_put(msg, portid, seq, flags, NL80211_CMD_NEW_MPATH);
 	if (!hdr)
 		return -1;
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath()
  2014-11-04 15:14 [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath() Henning Rogge
@ 2014-11-04 15:37 ` Johannes Berg
  2014-11-04 15:56   ` Henning Rogge
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2014-11-04 15:37 UTC (permalink / raw)
  To: Henning Rogge; +Cc: linux-wireless, Henning Rogge

On Tue, 2014-11-04 at 16:14 +0100, Henning Rogge wrote:
> Netlink command for nl80211_send_mpath() should be NL80211_CMD_NEW_MPATH.

Doh. Applied, of course.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath()
  2014-11-04 15:37 ` Johannes Berg
@ 2014-11-04 15:56   ` Henning Rogge
  2014-11-04 16:05     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Henning Rogge @ 2014-11-04 15:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Henning Rogge

Hi,

the only reason why nobody noticed is that the "iw" tool does not even
check the cmd field of the kernel replies it process. I wonder if "iw"
should check the value, just to make sure bugs like this are easier to
detect.

Henning Rogge

On Tue, Nov 4, 2014 at 4:37 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2014-11-04 at 16:14 +0100, Henning Rogge wrote:
>> Netlink command for nl80211_send_mpath() should be NL80211_CMD_NEW_MPATH.
>
> Doh. Applied, of course.
>
> johannes
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath()
  2014-11-04 15:56   ` Henning Rogge
@ 2014-11-04 16:05     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2014-11-04 16:05 UTC (permalink / raw)
  To: Henning Rogge; +Cc: linux-wireless, Henning Rogge

On Tue, 2014-11-04 at 16:56 +0100, Henning Rogge wrote:
> Hi,
> 
> the only reason why nobody noticed is that the "iw" tool does not even
> check the cmd field of the kernel replies it process. I wonder if "iw"
> should check the value, just to make sure bugs like this are easier to
> detect.

It doesn't really have to since it's not processing events on the same
socket ... but maybe we should just add some sanity checks.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-04 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-04 15:14 [PATCH] cfg80211: fix nl80211 cmd id in nl80211_send_mpath() Henning Rogge
2014-11-04 15:37 ` Johannes Berg
2014-11-04 15:56   ` Henning Rogge
2014-11-04 16:05     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.