summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-02-22 15:53:45 -0500
committerDonald Sharp <sharpd@nvidia.com>2024-08-21 10:17:47 -0400
commitb62de7de2e8bb2ee8181ddfc2daf47f99aaf8e11 (patch)
tree8a30fc998f87cc94e8cbe167c71b996ac30f10ca /zebra/rt_netlink.c
parentdb87ab3d861a2da9720317762b6990b2295e7afd (diff)
zebra, tests: Connected and Local routes should have a weight of 1
All routes received by zebra from upper level protocols have a weight of 1. Let's just make everything extremely consistent in our code. Lot's of tests needed to be fixed up to make this work. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 768090badb..c22145be69 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;
@@ -3210,7 +3210,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 +3357,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;