aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_netlink-invalid-arg.patch
blob: a6d1828d22309f45497360285820779edecbf1d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Upstream-Status: Pending

Description: Fix "NETLINK: Error: Invalid argument" for links that are down, in kernel 4.4+
Author: Jim Paris <jim@jtan.com>
Bug-Debian: http://bugs.debian.org/864889
Index: ifmetric/src/nlrequest.c
===================================================================
--- a/src/ifmetric.c
+++ b/src/ifmetric.c
@@ -97,6 +97,8 @@
     l = NLMSG_PAYLOAD(n, sizeof(struct rtmsg));
     a = RTM_RTA(r);
     
+    r->rtm_flags &= ~(RTNH_F_DEAD | RTNH_F_LINKDOWN);
+
     while(RTA_OK(a, l)) {
         switch(a->rta_type) {
             case RTA_PRIORITY: