Skip to contentSkip to conversation

iptuntap: use TUNDEV macro

PATCH Applied Denis Kirjanov 2 participants 2 messages Feb 20, 2024 – Feb 26, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iptuntap: use TUNDEV macro

the code already has a path to the tan/tap device

---
 ip/iptuntap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
ip/iptuntap.c +2 -3
index dbb07580..b7018a6f 100644
@@ -271,8 +271,7 @@ static void show_processes(const char *name)
 
 	fd_path = globbuf.gl_pathv;
 	while (*fd_path) {
-		const char *dev_net_tun = "/dev/net/tun";
-		const size_t linkbuf_len = strlen(dev_net_tun) + 2;
+		const size_t linkbuf_len = strlen(TUNDEV) + 2;
 		char linkbuf[linkbuf_len], *fdinfo;
 		int pid, fd;
 		FILE *f;
@@ -289,7 +288,7 @@ static void show_processes(const char *name)
 			goto next;
 		}
 		linkbuf[err] = '\0';
-		if (strcmp(dev_net_tun, linkbuf))
+		if (strcmp(TUNDEV, linkbuf))
 			goto next;
 
 		if (asprintf(&fdinfo, "/proc/%d/fdinfo/%d", pid, fd) < 0)
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 6 lines · On Tue, 20 Feb 2024 08:45:44 -0500 you wrote:

the code already has a path to the tan/tap device

---
 ip/iptuntap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Here is the summary with links:
- [iproute2] iptuntap: use TUNDEV macro

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=533fb3c4bec8

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html