aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/ifmetric/ifmetric/ifmetric.c_netlink-invalid-arg.patch
blob: 374135d4f6383abcaa32c4ab09b18e2ee9eb9515 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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: