diff options
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 768090badb..75e4396e92 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -506,7 +506,7 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb, void *gate, afi_t afi, vrf_id_t vrf_id) { struct interface *ifp = NULL; - struct nexthop nh = {0}; + struct nexthop nh = {.weight = 1}; mpls_label_t labels[MPLS_MAX_LABELS] = {0}; int num_labels = 0; enum seg6local_action_t seg6l_act = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC; @@ -799,8 +799,6 @@ int netlink_route_change_read_unicast_internal(struct nlmsghdr *h, return 0; if (rtm->rtm_protocol == RTPROT_REDIRECT) return 0; - if (rtm->rtm_protocol == RTPROT_KERNEL) - return 0; selfroute = is_selfroute(rtm->rtm_protocol); @@ -1690,7 +1688,7 @@ static bool _netlink_route_build_singlepath(const struct prefix *p, return false; if (!nl_attr_put(nlmsg, req_size, SEG6_LOCAL_NH6, &ctx->nh6, - sizeof(struct in_addr))) + sizeof(struct in6_addr))) return false; break; case ZEBRA_SEG6_LOCAL_ACTION_END_DT6: @@ -2981,7 +2979,7 @@ ssize_t netlink_nexthop_msg_encode(uint16_t cmd, if (!nl_attr_put(&req->n, buflen, SEG6_LOCAL_NH6, &ctx->nh6, - sizeof(struct in_addr))) + sizeof(struct in6_addr))) return 0; break; case SEG6_LOCAL_ACTION_END_DT6: @@ -3210,7 +3208,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb, struct interface **ifp, ns_id_t ns_id) { - struct nexthop nh = {}; + struct nexthop nh = {.weight = 1}; void *gate = NULL; enum nexthop_types_t type = 0; int if_index = 0; @@ -3357,7 +3355,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup) vrf_id_t vrf_id = VRF_DEFAULT; struct interface *ifp = NULL; struct nhmsg *nhm = NULL; - struct nexthop nh = {}; + struct nexthop nh = {.weight = 1}; struct nh_grp grp[MULTIPATH_NUM] = {}; /* Count of nexthops in group array */ uint8_t grp_count = 0; |
