aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander V. Chernikov <melifaro@FreeBSD.org>2021-02-24 16:42:48 +0000
committerAlexander V. Chernikov <melifaro@FreeBSD.org>2021-02-25 21:43:37 +0000
commit7dfdd039a3584885648d33888359032479038dc1 (patch)
tree1675cb8ad299e5c780500037d35d0db84e29e911
parentbbcdd9faca55758b228b949f1c1bb41b85e90a8e (diff)
downloadsrc-7dfdd039a3584885648d33888359032479038dc1.tar.gz
src-7dfdd039a3584885648d33888359032479038dc1.zip
Fix crash with rtadv-originated multipath IPv6 routes.
PR: 253800 Reported by: Frederic Denis <freebsdml at hecian.net> MFC after: immediately (cherry picked from commit cc3fa1e29fda2cc761e793a61cef3bd2522b3468)
-rw-r--r--sys/netinet6/nd6_rtr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 51b831a956bc..2f721b4edcc3 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
#include <net/route.h>
#include <net/route/nhop.h>
#include <net/route/route_ctl.h>
-#include <net/route/route_var.h>
#include <net/radix.h>
#include <net/vnet.h>
@@ -699,7 +698,7 @@ defrouter_addreq(struct nd_defrouter *new)
NET_EPOCH_ASSERT();
error = rib_action(fibnum, RTM_ADD, &info, &rc);
if (error == 0) {
- struct nhop_object *nh = nhop_select(rc.rc_nh_new, 0);
+ struct nhop_object *nh = nhop_select_func(rc.rc_nh_new, 0);
rt_routemsg(RTM_ADD, rc.rc_rt, nh, fibnum);
new->installed = 1;
}
@@ -739,7 +738,7 @@ defrouter_delreq(struct nd_defrouter *dr)
NET_EPOCH_ENTER(et);
error = rib_action(fibnum, RTM_DELETE, &info, &rc);
if (error == 0) {
- struct nhop_object *nh = nhop_select(rc.rc_nh_old, 0);
+ struct nhop_object *nh = nhop_select_func(rc.rc_nh_old, 0);
rt_routemsg(RTM_DELETE, rc.rc_rt, nh, fibnum);
}
NET_EPOCH_EXIT(et);