From 264e137e0225b8c9e8b411c26da02447f5d71dd3 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 24 Jun 2019 17:10:29 -0700 Subject: iproute2: Fix get_link_kind when linked statically --- ...-Fix-get_link_kind-when-linked-statically.patch | 124 +++++++++++++++++++++ pkg/iproute2/ver | 2 +- 2 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 pkg/iproute2/patch/0012-ip-Fix-get_link_kind-when-linked-statically.patch (limited to 'pkg/iproute2') diff --git a/pkg/iproute2/patch/0012-ip-Fix-get_link_kind-when-linked-statically.patch b/pkg/iproute2/patch/0012-ip-Fix-get_link_kind-when-linked-statically.patch new file mode 100644 index 00000000..e5110c40 --- /dev/null +++ b/pkg/iproute2/patch/0012-ip-Fix-get_link_kind-when-linked-statically.patch @@ -0,0 +1,124 @@ +From cced9508238bd4ea087986ad683661cd7f27df27 Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Mon, 24 Jun 2019 16:03:55 -0700 +Subject: [PATCH] ip: Fix get_link_kind when linked statically + +--- + ip/iplink.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 86 insertions(+), 9 deletions(-) + +diff --git a/ip/iplink.c b/ip/iplink.c +index 3e86ec5a..27a33591 100644 +--- a/ip/iplink.c ++++ b/ip/iplink.c +@@ -149,21 +149,98 @@ struct link_util *get_link_kind(const char *id) + char buf[256]; + struct link_util *l; + ++ if (linkutil_list == NULL) { ++ // next) + if (strcmp(l->id, id) == 0) + return l; + + snprintf(buf, sizeof(buf), LIBDIR "/ip/link_%s.so", id); + dlh = dlopen(buf, RTLD_LAZY); +- if (dlh == NULL) { +- /* look in current binary, only open once */ +- dlh = BODY; +- if (dlh == NULL) { +- dlh = BODY = dlopen(NULL, RTLD_LAZY); +- if (dlh == NULL) +- return NULL; +- } +- } ++ if (dlh == NULL) ++ return NULL; + + snprintf(buf, sizeof(buf), "%s_link_util", id); + l = dlsym(dlh, buf); +-- +2.22.0 + diff --git a/pkg/iproute2/ver b/pkg/iproute2/ver index 992e8647..bf59d544 100644 --- a/pkg/iproute2/ver +++ b/pkg/iproute2/ver @@ -1 +1 @@ -5.1.0 r1 +5.1.0 r2 -- cgit v1.2.3