[lldpd]: Use kernel autoprobe for netlink socket .nl_pid portion of the address (#2164)

This commit is contained in:
pavel-shirshov 2018-10-17 19:32:27 -07:00 committed by lguohan
parent 4a22de42c6
commit 891e2568dd
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From 2ee8585e8b716719a11235ab5c291b2f6ac9ce1a Mon Sep 17 00:00:00 2001
From: Pavel Shirshov <pavelsh@microsoft.com>
Date: Wed, 17 Oct 2018 21:05:58 +0000
Subject: [PATCH] Let linux kernel to find appropriate nl_pid automatically
---
src/daemon/netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/netlink.c b/src/daemon/netlink.c
index 1a64a23..f4227b8 100644
--- a/src/daemon/netlink.c
+++ b/src/daemon/netlink.c
@@ -93,7 +93,7 @@ netlink_connect(struct lldpd *cfg, int protocol, unsigned groups)
int s;
struct sockaddr_nl local = {
.nl_family = AF_NETLINK,
- .nl_pid = getpid(),
+ .nl_pid = 0,
.nl_groups = groups
};
--
2.7.4

View File

@ -1,2 +1,3 @@
# This series applies on GIT commit 396961a038a38675d46f96eaa7b430b2a1f8701b # This series applies on GIT commit 396961a038a38675d46f96eaa7b430b2a1f8701b
0001-return-error-when-port-does-not-exist.patch 0001-return-error-when-port-does-not-exist.patch
0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch