]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/ipnexthop.c
nexthop: Fix Deletion display
[mirror_iproute2.git] / ip / ipnexthop.c
index 9f860c8cea251693955ab149259f6b85a55367ea..c33cef0c9ae045abe17908830ac4b6a87e6854a5 100644 (file)
@@ -59,13 +59,13 @@ static int nh_dump_filter(struct nlmsghdr *nlh, int reqlen)
        }
 
        if (filter.groups) {
-               addattr_l(nlh, reqlen, NHA_GROUPS, NULL, 0);
+               err = addattr_l(nlh, reqlen, NHA_GROUPS, NULL, 0);
                if (err)
                        return err;
        }
 
        if (filter.master) {
-               addattr32(nlh, reqlen, NHA_MASTER, filter.master);
+               err = addattr32(nlh, reqlen, NHA_MASTER, filter.master);
                if (err)
                        return err;
        }
@@ -224,7 +224,7 @@ int print_nexthop(struct nlmsghdr *n, void *arg)
 
        open_json_object(NULL);
 
-       if (n->nlmsg_type == RTM_DELROUTE)
+       if (n->nlmsg_type == RTM_DELNEXTHOP)
                print_bool(PRINT_ANY, "deleted", "Deleted ", true);
 
        if (tb[NHA_ID])