diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/if_netlink.c | 12 | ||||
-rw-r--r-- | zebra/kernel_netlink.c | 10 | ||||
-rw-r--r-- | zebra/kernel_netlink.h | 4 | ||||
-rw-r--r-- | zebra/rt_netlink.c | 28 | ||||
-rw-r--r-- | zebra/rule_netlink.c | 4 |
5 files changed, 29 insertions, 29 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c index ce0779e91..15645d024 100644 --- a/zebra/if_netlink.c +++ b/zebra/if_netlink.c @@ -1089,7 +1089,7 @@ int interface_lookup_netlink(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_interface, netlink_cmd, &dp_info, 0, - 1); + true); if (ret < 0) return ret; @@ -1099,7 +1099,7 @@ int interface_lookup_netlink(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_interface, netlink_cmd, &dp_info, 0, - 1); + true); if (ret < 0) return ret; @@ -1128,7 +1128,7 @@ static int interface_addr_lookup_netlink(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_interface_addr, netlink_cmd, &dp_info, - 0, 1); + 0, true); if (ret < 0) return ret; @@ -1137,7 +1137,7 @@ static int interface_addr_lookup_netlink(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_interface_addr, netlink_cmd, &dp_info, - 0, 1); + 0, true); if (ret < 0) return ret; @@ -1168,7 +1168,7 @@ int kernel_interface_set_master(struct interface *master, nl_attr_put32(&req.n, sizeof(req), IFLA_LINK, slave->ifindex); return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } /* Interface address modification. */ @@ -2054,7 +2054,7 @@ int netlink_protodown(struct interface *ifp, bool down) nl_attr_put32(&req.n, sizeof(req), IFLA_LINK, ifp->ifindex); return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } /* Interface information read by netlink. */ diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 602bdc1dc..86e8f65b5 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -419,7 +419,7 @@ static int kernel_read(struct thread *thread) zebra_dplane_info_from_zns(&dp_info, zns, false); netlink_parse_info(netlink_information_fetch, &zns->netlink, &dp_info, - 5, 0); + 5, false); thread_add_read(zrouter.master, kernel_read, zns, zns->netlink.sock, &zns->t_netlink); @@ -433,7 +433,7 @@ static int kernel_read(struct thread *thread) int kernel_dplane_read(struct zebra_dplane_info *info) { netlink_parse_info(dplane_netlink_information_fetch, &info->nls, info, - 5, 0); + 5, false); return 0; } @@ -933,7 +933,7 @@ static int netlink_parse_error(const struct nlsock *nl, struct nlmsghdr *h, int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int), const struct nlsock *nl, const struct zebra_dplane_info *zns, - int count, int startup) + int count, bool startup) { int status; int ret = 0; @@ -1036,7 +1036,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int), static int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup), struct nlmsghdr *n, const struct zebra_dplane_info *dp_info, - int startup) + bool startup) { const struct nlsock *nl; @@ -1067,7 +1067,7 @@ netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup), */ int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup), struct nlmsghdr *n, struct nlsock *nl, struct zebra_ns *zns, - int startup) + bool startup) { struct zebra_dplane_info dp_info; diff --git a/zebra/kernel_netlink.h b/zebra/kernel_netlink.h index d8e5671b7..37c76b9e5 100644 --- a/zebra/kernel_netlink.h +++ b/zebra/kernel_netlink.h @@ -94,11 +94,11 @@ extern const char *nl_rttype_to_str(uint8_t rttype); extern int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int), const struct nlsock *nl, const struct zebra_dplane_info *dp_info, - int count, int startup); + int count, bool startup); extern int netlink_talk_filter(struct nlmsghdr *h, ns_id_t ns, int startup); extern int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup), struct nlmsghdr *n, struct nlsock *nl, - struct zebra_ns *zns, int startup); + struct zebra_ns *zns, bool startup); extern int netlink_request(struct nlsock *nl, void *req); enum netlink_msg_status { diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index e36f320ad..488bca06d 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1171,7 +1171,7 @@ int netlink_route_read(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_route_change_read_unicast, - &zns->netlink_cmd, &dp_info, 0, 1); + &zns->netlink_cmd, &dp_info, 0, true); if (ret < 0) return ret; @@ -1180,7 +1180,7 @@ int netlink_route_read(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_route_change_read_unicast, - &zns->netlink_cmd, &dp_info, 0, 1); + &zns->netlink_cmd, &dp_info, 0, true); if (ret < 0) return ret; @@ -1810,7 +1810,7 @@ static int netlink_neigh_update(int cmd, int ifindex, void *addr, char *lla, nl_attr_put(&req.n, sizeof(req), NDA_LLADDR, lla, llalen); return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } static bool nexthop_set_src(const struct nexthop *nexthop, int family, @@ -2268,7 +2268,7 @@ int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *in) nl_attr_put32(&req.n, sizeof(req), RTA_TABLE, actual_table); suc = netlink_talk(netlink_route_change_read_multicast, &req.n, - &zns->netlink_cmd, zns, 0); + &zns->netlink_cmd, zns, false); mroute = NULL; return suc; @@ -3019,7 +3019,7 @@ int netlink_nexthop_read(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_nexthop_change, &zns->netlink_cmd, - &dp_info, 0, 1); + &dp_info, 0, true); if (!ret) /* If we succesfully read in nexthop objects, @@ -3427,7 +3427,7 @@ int netlink_macfdb_read(struct zebra_ns *zns) /* We are reading entire table. */ filter_vlan = 0; ret = netlink_parse_info(netlink_macfdb_table, &zns->netlink_cmd, - &dp_info, 0, 1); + &dp_info, 0, true); return ret; } @@ -3461,7 +3461,7 @@ int netlink_macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp, if (ret < 0) return ret; ret = netlink_parse_info(netlink_macfdb_table, &zns->netlink_cmd, - &dp_info, 0, 0); + &dp_info, 0, false); /* Reset VLAN filter. */ filter_vlan = 0; @@ -3526,7 +3526,7 @@ int netlink_macfdb_read_specific_mac(struct zebra_ns *zns, return ret; ret = netlink_parse_info(netlink_macfdb_table, &zns->netlink_cmd, - &dp_info, 1, 0); + &dp_info, 1, false); return ret; } @@ -3930,7 +3930,7 @@ int netlink_neigh_read(struct zebra_ns *zns) if (ret < 0) return ret; ret = netlink_parse_info(netlink_neigh_table, &zns->netlink_cmd, - &dp_info, 0, 1); + &dp_info, 0, true); return ret; } @@ -3951,7 +3951,7 @@ int netlink_neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if) if (ret < 0) return ret; ret = netlink_parse_info(netlink_neigh_table, &zns->netlink_cmd, - &dp_info, 0, 0); + &dp_info, 0, false); return ret; } @@ -4022,7 +4022,7 @@ int netlink_neigh_read_specific_ip(const struct ipaddr *ip, return ret; ret = netlink_parse_info(netlink_neigh_table, &zns->netlink_cmd, - &dp_info, 1, 0); + &dp_info, 1, false); return ret; } @@ -4442,7 +4442,7 @@ static int netlink_fdb_nh_update(uint32_t nh_id, struct in_addr vtep_ip) } return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } static int netlink_fdb_nh_del(uint32_t nh_id) @@ -4477,7 +4477,7 @@ static int netlink_fdb_nh_del(uint32_t nh_id) } return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } static int netlink_fdb_nhg_update(uint32_t nhg_id, uint32_t nh_cnt, @@ -4537,7 +4537,7 @@ static int netlink_fdb_nhg_update(uint32_t nhg_id, uint32_t nh_cnt, } return netlink_talk(netlink_talk_filter, &req.n, &zns->netlink_cmd, zns, - 0); + false); } static int netlink_fdb_nhg_del(uint32_t nhg_id) diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c index b651edd8f..fbf262037 100644 --- a/zebra/rule_netlink.c +++ b/zebra/rule_netlink.c @@ -403,7 +403,7 @@ int netlink_rules_read(struct zebra_ns *zns) return ret; ret = netlink_parse_info(netlink_rule_change, &zns->netlink_cmd, - &dp_info, 0, 1); + &dp_info, 0, true); if (ret < 0) return ret; @@ -412,7 +412,7 @@ int netlink_rules_read(struct zebra_ns *zns) return ret; ret = netlink_parse_info(netlink_rule_change, &zns->netlink_cmd, - &dp_info, 0, 1); + &dp_info, 0, true); return ret; } |