summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2025-02-05 08:32:13 -0500
committerGitHub <noreply@github.com>2025-02-05 08:32:13 -0500
commit3fabd4f4f97630ef911a83712eef4ac515a76a42 (patch)
tree78d64f99a0d44757ac4021053b5433b6f39c58b8 /zebra
parentb7d58011bd3888a47fdac5e487d5ffe2a4ea8f45 (diff)
parentabbfcc49f93bd16d331402dbe1ac9aad4e27495b (diff)
Merge pull request #18014 from donaldsharp/nexthop_leak
Nexthop leak
Diffstat (limited to 'zebra')
-rw-r--r--zebra/rt_netlink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index d696b19859..9a60e32b65 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1295,6 +1295,12 @@ static int netlink_route_change_read_unicast_internal(struct nlmsghdr *h,
flags, &p,
(struct prefix_ipv6 *)&src_p, &nh, 0,
table, metric, distance, true);
+
+ if (nh.nh_label)
+ nexthop_del_labels(&nh);
+
+ if (nh.nh_srv6)
+ nexthop_del_srv6_seg6(&nh);
} else {
/* XXX: need to compare the entire list of
* nexthops here for NLM_F_APPEND stupidity */