Skip to content

Commit

Permalink
wwan: core: Fix missing RTM_NEWLINK event for default link
Browse files Browse the repository at this point in the history
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: ca37429 ("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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Loic Poulain authored and David S. Miller committed Jul 23, 2021
1 parent 3bdba2c commit 8cc236d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wwan/wwan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 8cc236d

Please sign in to comment.