aboutsummaryrefslogtreecommitdiff
path: root/sys/net/route/route_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/route/route_ctl.c')
-rw-r--r--sys/net/route/route_ctl.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index a573a07178e4..ade0b2a96b24 100644
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -79,7 +79,6 @@ struct rib_subscription {
static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type,
struct rib_cmd_info *rc);
-static void rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info);
static void destroy_subscription_epoch(epoch_context_t ctx);
static struct rib_head *
@@ -275,10 +274,8 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
if ((rn != NULL) || (rt_old != NULL))
rib_notify(rnh, RIB_NOTIFY_DELAYED, rc);
- if (rt_old != NULL) {
- rt_notifydelete(rt_old, info);
+ if (rt_old != NULL)
rtfree(rt_old);
- }
/*
* If it still failed to go into the tree,
@@ -290,13 +287,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (EEXIST);
}
- /*
- * If this protocol has something to add to this then
- * allow it to do that as well.
- */
- if (ifa->ifa_rtrequest)
- ifa->ifa_rtrequest(RTM_ADD, rt, rt->rt_nhop, info);
-
RT_UNLOCK(rt);
return (0);
@@ -432,7 +422,6 @@ del_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (error);
rib_notify(rnh, RIB_NOTIFY_DELAYED, rc);
- rt_notifydelete(rt, info);
/*
* If the caller wants it, then it can have it,
@@ -554,15 +543,9 @@ change_route_one(struct rib_head *rnh, struct rt_addrinfo *info,
RT_LOCK(rt);
/* Provide notification to the protocols.*/
- if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest)
- nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info);
-
rt->rt_nhop = nh;
rt_setmetrics(info, rt);
- if ((nh_orig->nh_ifa != nh->nh_ifa) && nh_orig->nh_ifa->ifa_rtrequest)
- nh_orig->nh_ifa->ifa_rtrequest(RTM_DELETE, rt, nh_orig, info);
-
/* Finalize notification */
rc->rc_rt = rt;
rc->rc_nh_old = nh_orig;
@@ -641,19 +624,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info,
}
-static void
-rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info)
-{
- struct ifaddr *ifa;
-
- /*
- * give the protocol a chance to keep things in sync.
- */
- ifa = rt->rt_nhop->nh_ifa;
- if (ifa != NULL && ifa->ifa_rtrequest != NULL)
- ifa->ifa_rtrequest(RTM_DELETE, rt, rt->rt_nhop, info);
-}
-
struct rt_delinfo
{
struct rt_addrinfo info;
@@ -749,8 +719,6 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t *filter_f, void *arg, bool
di.info.rti_info[RTAX_DST] = rt_key(rt);
di.info.rti_info[RTAX_NETMASK] = rt_mask(rt);
- rt_notifydelete(rt, &di.info);
-
if (report)
rt_routemsg(RTM_DELETE, rt, rt->rt_nhop->nh_ifp, 0,
fibnum);