From d5e2f0826eb6909869a7850596ec5384ac47d6b0 Mon Sep 17 00:00:00 2001 From: Pavel Shirshov Date: Wed, 17 Oct 2018 15:30:44 -0700 Subject: [PATCH] [lldpd]: Use kernel autoprobe for netlink socket .nl_pid portion of the address --- ...el-to-find-appropriate-nl_pid-automa.patch | 25 +++++++++++++++++++ src/lldpd/patch/series | 1 + 2 files changed, 26 insertions(+) create mode 100644 src/lldpd/patch/0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch diff --git a/src/lldpd/patch/0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch b/src/lldpd/patch/0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch new file mode 100644 index 000000000000..801fdd8ec96e --- /dev/null +++ b/src/lldpd/patch/0002-Let-linux-kernel-to-find-appropriate-nl_pid-automa.patch @@ -0,0 +1,25 @@ +From 2ee8585e8b716719a11235ab5c291b2f6ac9ce1a Mon Sep 17 00:00:00 2001 +From: Pavel Shirshov +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 + diff --git a/src/lldpd/patch/series b/src/lldpd/patch/series index 8aa5ab8d8f3f..2ca46b575396 100644 --- a/src/lldpd/patch/series +++ b/src/lldpd/patch/series @@ -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