Skip to content

Commit

Permalink
[lldpd]: Use kernel autoprobe for netlink socket .nl_pid portion of t…
Browse files Browse the repository at this point in the history
…he address (#2164)
  • Loading branch information
pavel-shirshov authored and lguohan committed Oct 18, 2018
1 parent 4a22de4 commit 891e256
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions src/lldpd/patch/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# This series applies on GIT commit 396961a038a38675d46f96eaa7b430b2a1f8701b
0001-return-error-when-port-does-not-exist.patch
0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch

0 comments on commit 891e256

Please sign in to comment.