Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang committed Oct 29, 2024
1 parent dff99f2 commit b9b0f8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,10 @@ static int mptcp_pm_nl_dump_addr(struct mptcp_id_bitmap *bitmap,
struct pm_nl_pernet *pernet;

pernet = pm_nl_get_pernet(net);

spin_lock_bh(&pernet->lock);
bitmap_copy(bitmap->map, pernet->id_bitmap.map, MPTCP_PM_MAX_ADDR_ID + 1);
spin_unlock_bh(&pernet->lock);

return 0;
}
Expand All @@ -1883,8 +1886,7 @@ int mptcp_pm_nl_get_addr_dumpit(struct sk_buff *msg,
int i;

id_bitmap = (struct mptcp_id_bitmap *)cb->ctx;
if (!id)
mptcp_pm_dump_addr(id_bitmap, info);
mptcp_pm_dump_addr(id_bitmap, info);

for (i = id; i < MPTCP_PM_MAX_ADDR_ID + 1; i++) {
if (test_bit(i, id_bitmap->map)) {
Expand Down

0 comments on commit b9b0f8d

Please sign in to comment.