forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wsdd2: backport Netgear/wsdd2#46 to fix interface selection
Fixes Netgear/wsdd2#36 Backport of Netgear/wsdd2#46 In a ksmbd+wsdd2 configuration, the server becomes invisible to Windows 11 clients after a few minutes to a few hours. This commit merges a pending PR Netgear/wsdd2#46 from the upstream repository to address this issue. Signed-off-by: Hang Zhou <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Index: wsdd2-2022-04-25-e37443ac/wsdd2.c | ||
From 50f97a909d2c0d8e2c20d87c055531151223600b Mon Sep 17 00:00:00 2001 | ||
From: Lev <[email protected]> | ||
Date: Sun, 12 Mar 2023 08:53:52 +0300 | ||
Subject: [PATCH] Fix interface selection | ||
|
||
Fix selection of new/modified interface when running in single interface mode with -i key | ||
|
||
Backport from Netgear/wsdd2#46 | ||
=================================================================== | ||
--- wsdd2-2022-04-25-e37443ac.orig/wsdd2.c | ||
+++ wsdd2-2022-04-25-e37443ac/wsdd2.c | ||
@@ -520,7 +520,7 @@ static bool is_new_addr(struct nlmsghdr | ||
|
||
if (ifindex && ifam->ifa_index != ifindex) { | ||
char buf[IFNAMSIZ]; | ||
- if (!if_indextoname(ifindex, buf) || strcmp(buf, ifname) != 0) | ||
+ if (!if_indextoname(ifam->ifa_index, buf) || strcmp(buf, ifname) != 0) | ||
return false; | ||
ifindex = ifam->ifa_index; | ||
} |