diff options
| author | Mark Stapp <mjs@voltanet.io> | 2019-03-01 16:19:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-01 16:19:31 -0500 |
| commit | 700e9faa28bbdc3460e1d7aa109b6e4acaf347b3 (patch) | |
| tree | 42a162d91d027b895a0d8a49c3554badc734770e /zebra/rt_netlink.c | |
| parent | fe39eb421e9d4567744ef7f9a402c1224093ec74 (diff) | |
| parent | 334734a8b6b32c28393fc318fb96e647363fbaec (diff) | |
Merge pull request #3894 from donaldsharp/install_replace
zebra: When installing a new route always use REPLACE
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 3868412b20..18cf389d5e 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1466,10 +1466,9 @@ static int netlink_route_multipath(int cmd, struct zebra_dplane_ctx *ctx) req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); req.n.nlmsg_flags = NLM_F_CREATE | NLM_F_REQUEST; - if (dplane_ctx_get_op(ctx) == DPLANE_OP_ROUTE_UPDATE) { - if ((p->family == AF_INET) || v6_rr_semantics) - req.n.nlmsg_flags |= NLM_F_REPLACE; - } + if ((cmd == RTM_NEWROUTE) && + ((p->family == AF_INET) || v6_rr_semantics)) + req.n.nlmsg_flags |= NLM_F_REPLACE; req.n.nlmsg_type = cmd; |
