Skip to content

Commit 969ba5b

Browse files
pavel-shirshovlguohan
authored andcommitted
[lldpd]: Use kernel autoprobe for netlink socket .nl_pid portion of the address (#2164)
1 parent 6a9bfaf commit 969ba5b

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 2ee8585e8b716719a11235ab5c291b2f6ac9ce1a Mon Sep 17 00:00:00 2001
2+
From: Pavel Shirshov <[email protected]>
3+
Date: Wed, 17 Oct 2018 21:05:58 +0000
4+
Subject: [PATCH] Let linux kernel to find appropriate nl_pid automatically
5+
6+
---
7+
src/daemon/netlink.c | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/src/daemon/netlink.c b/src/daemon/netlink.c
11+
index 1a64a23..f4227b8 100644
12+
--- a/src/daemon/netlink.c
13+
+++ b/src/daemon/netlink.c
14+
@@ -93,7 +93,7 @@ netlink_connect(struct lldpd *cfg, int protocol, unsigned groups)
15+
int s;
16+
struct sockaddr_nl local = {
17+
.nl_family = AF_NETLINK,
18+
- .nl_pid = getpid(),
19+
+ .nl_pid = 0,
20+
.nl_groups = groups
21+
};
22+
23+
--
24+
2.7.4
25+

src/lldpd/patch/series

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

0 commit comments

Comments
 (0)