From 62058b2a2591bb25871213849aa2f562858b247a Mon Sep 17 00:00:00 2001 From: Hang Zhou <929513338@qq.com> Date: Tue, 31 Oct 2023 03:01:51 +1100 Subject: [PATCH] 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 <929513338@qq.com> --- net/wsdd2/Makefile | 2 +- .../patches/010-wsdd-upstream-pr46.patch | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 net/wsdd2/patches/010-wsdd-upstream-pr46.patch diff --git a/net/wsdd2/Makefile b/net/wsdd2/Makefile index a10a68cac7d93b..3da9591ebef610 100644 --- a/net/wsdd2/Makefile +++ b/net/wsdd2/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wsdd2 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/Netgear/wsdd2.git diff --git a/net/wsdd2/patches/010-wsdd-upstream-pr46.patch b/net/wsdd2/patches/010-wsdd-upstream-pr46.patch new file mode 100644 index 00000000000000..0c59246cd197cc --- /dev/null +++ b/net/wsdd2/patches/010-wsdd-upstream-pr46.patch @@ -0,0 +1,21 @@ +Index: wsdd2-2022-04-25-e37443ac/wsdd2.c +From 50f97a909d2c0d8e2c20d87c055531151223600b Mon Sep 17 00:00:00 2001 +From: Lev +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; + }