Skip to content

Commit

Permalink
wsdd2: backport Netgear/wsdd2#46 to fix interface selection
Browse files Browse the repository at this point in the history
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
rikka0w0 committed Nov 20, 2023
1 parent ac9973b commit 62058b2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/wsdd2/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 21 additions & 0 deletions net/wsdd2/patches/010-wsdd-upstream-pr46.patch
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;
}

0 comments on commit 62058b2

Please sign in to comment.