]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: drop unnecessary family setting
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Feb 2021 17:05:28 +0000 (02:05 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Feb 2021 17:06:26 +0000 (02:06 +0900)
It is already set in sd_rtnl_message_new_nexthop().

src/network/networkd-nexthop.c

index ab0562e9e810e2656160666fb25177e9db32c2c0..6143de11f3b49da4a2b434e58f763e9c74f3041c 100644 (file)
@@ -281,10 +281,6 @@ static int nexthop_configure(NextHop *nexthop, Link *link) {
                 r = netlink_message_append_in_addr_union(req, NHA_GATEWAY, nexthop->family, &nexthop->gw);
                 if (r < 0)
                         return log_link_error_errno(link, r, "Could not append NHA_GATEWAY attribute: %m");
-
-                r = sd_rtnl_message_nexthop_set_family(req, nexthop->family);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set nexthop family: %m");
         }
 
         r = netlink_call_async(link->manager->rtnl, NULL, req, nexthop_handler,