Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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