]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/iproute.c
Merge branch 'master' into net-next
[mirror_iproute2.git] / ip / iproute.c
index 1b9c90356730c5153db178eefbceef60ffaf2a48..4e022d77275f6b8e8585fff45ec4ad44b2ae293b 100644 (file)
@@ -1243,16 +1243,14 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)
        if (!dst_ok)
                usage();
 
-       if (d || nhs_ok)  {
+       if (d) {
                int idx;
 
-               if (d) {
-                       if ((idx = ll_name_to_index(d)) == 0) {
-                               fprintf(stderr, "Cannot find device \"%s\"\n", d);
-                               return -1;
-                       }
-                       addattr32(&req.n, sizeof(req), RTA_OIF, idx);
+               if ((idx = ll_name_to_index(d)) == 0) {
+                       fprintf(stderr, "Cannot find device \"%s\"\n", d);
+                       return -1;
                }
+               addattr32(&req.n, sizeof(req), RTA_OIF, idx);
        }
 
        if (mxrta->rta_len > RTA_LENGTH(0)) {