All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link
@ 2021-07-22 18:21 Loic Poulain
  2021-07-22 18:35 ` Sergey Ryazanov
  2021-07-23 16:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Loic Poulain @ 2021-07-22 18:21 UTC (permalink / raw)
  To: davem, kuba; +Cc: johannes, netdev, ryazanov.s.a, Loic Poulain, stable

A wwan link created via the wwan_create_default_link procedure is
never notified to the user (RTM_NEWLINK), causing issues with user
tools relying on such event to track network links (NetworkManager).

This is because the procedure misses a call to rtnl_configure_link(),
which sets the link as initialized and notifies the new link (cf
proper usage in __rtnl_newlink()).

Cc: stable@vger.kernel.org
Fixes: ca374290aaad ("wwan: core: support default netdev creation")
Suggested-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/net/wwan/wwan_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c
index 3e16c31..674a81d 100644
--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -984,6 +984,8 @@ static void wwan_create_default_link(struct wwan_device *wwandev,
 		goto unlock;
 	}
 
+	rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
+
 unlock:
 	rtnl_unlock();
 
-- 
2.7.4


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

* Re: [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link
  2021-07-22 18:21 [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link Loic Poulain
@ 2021-07-22 18:35 ` Sergey Ryazanov
  2021-07-23 16:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Ryazanov @ 2021-07-22 18:35 UTC (permalink / raw)
  To: Loic Poulain; +Cc: David Miller, Jakub Kicinski, Johannes Berg, netdev, stable

On Thu, Jul 22, 2021 at 9:10 PM Loic Poulain <loic.poulain@linaro.org> wrote:
> A wwan link created via the wwan_create_default_link procedure is
> never notified to the user (RTM_NEWLINK), causing issues with user
> tools relying on such event to track network links (NetworkManager).
>
> This is because the procedure misses a call to rtnl_configure_link(),
> which sets the link as initialized and notifies the new link (cf
> proper usage in __rtnl_newlink()).
>
> Cc: stable@vger.kernel.org
> Fixes: ca374290aaad ("wwan: core: support default netdev creation")
> Suggested-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>

Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

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

* Re: [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link
  2021-07-22 18:21 [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link Loic Poulain
  2021-07-22 18:35 ` Sergey Ryazanov
@ 2021-07-23 16:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-23 16:20 UTC (permalink / raw)
  To: Loic Poulain; +Cc: davem, kuba, johannes, netdev, ryazanov.s.a, stable

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Thu, 22 Jul 2021 20:21:05 +0200 you wrote:
> A wwan link created via the wwan_create_default_link procedure is
> never notified to the user (RTM_NEWLINK), causing issues with user
> tools relying on such event to track network links (NetworkManager).
> 
> This is because the procedure misses a call to rtnl_configure_link(),
> which sets the link as initialized and notifies the new link (cf
> proper usage in __rtnl_newlink()).
> 
> [...]

Here is the summary with links:
  - wwan: core: Fix missing RTM_NEWLINK event for default link
    https://git.kernel.org/netdev/net/c/68d1f1d4af18

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-07-23 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 18:21 [PATCH] wwan: core: Fix missing RTM_NEWLINK event for default link Loic Poulain
2021-07-22 18:35 ` Sergey Ryazanov
2021-07-23 16:20 ` patchwork-bot+netdevbpf

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.