Changeset View
Changeset View
Standalone View
Standalone View
sys/net/route/route_ctl.c
Show First 20 Lines • Show All 802 Lines • ▼ Show 20 Lines | #endif | ||||
if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT)) | if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT)) | ||||
panic ("rtrequest delete"); | panic ("rtrequest delete"); | ||||
rt = RNTORT(rn); | rt = RNTORT(rn); | ||||
rt->rte_flags &= ~RTF_UP; | rt->rte_flags &= ~RTF_UP; | ||||
/* Finalize notification */ | /* Finalize notification */ | ||||
rnh->rnh_gen++; | rib_bump_gen(rnh); | ||||
rnh->rnh_prefixes--; | rnh->rnh_prefixes--; | ||||
rc->rc_cmd = RTM_DELETE; | rc->rc_cmd = RTM_DELETE; | ||||
rc->rc_rt = rt; | rc->rc_rt = rt; | ||||
rc->rc_nh_old = rt->rt_nhop; | rc->rc_nh_old = rt->rt_nhop; | ||||
rc->rc_nh_weight = rt->rt_weight; | rc->rc_nh_weight = rt->rt_weight; | ||||
rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); | rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc); | ||||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | add_route_nhop(struct rib_head *rnh, struct rtentry *rt, | ||||
rt->rt_weight = rnd->rnd_weight; | rt->rt_weight = rnd->rnd_weight; | ||||
rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, rt->rt_nodes); | rn = rnh->rnh_addaddr(ndst, netmask, &rnh->head, rt->rt_nodes); | ||||
if (rn != NULL) { | if (rn != NULL) { | ||||
if (rt->rt_expire > 0) | if (rt->rt_expire > 0) | ||||
tmproutes_update(rnh, rt); | tmproutes_update(rnh, rt); | ||||
/* Finalize notification */ | /* Finalize notification */ | ||||
rnh->rnh_gen++; | rib_bump_gen(rnh); | ||||
rnh->rnh_prefixes++; | rnh->rnh_prefixes++; | ||||
rc->rc_cmd = RTM_ADD; | rc->rc_cmd = RTM_ADD; | ||||
rc->rc_rt = rt; | rc->rc_rt = rt; | ||||
rc->rc_nh_old = NULL; | rc->rc_nh_old = NULL; | ||||
rc->rc_nh_new = rnd->rnd_nhop; | rc->rc_nh_new = rnd->rnd_nhop; | ||||
rc->rc_nh_weight = rnd->rnd_weight; | rc->rc_nh_weight = rnd->rnd_weight; | ||||
Show All 39 Lines | if (rnd->rnd_nhop != NULL) { | ||||
rn = rnh->rnh_deladdr(ndst, netmask, &rnh->head); | rn = rnh->rnh_deladdr(ndst, netmask, &rnh->head); | ||||
if (rn == NULL) | if (rn == NULL) | ||||
return (ESRCH); | return (ESRCH); | ||||
rt = RNTORT(rn); | rt = RNTORT(rn); | ||||
rt->rte_flags &= ~RTF_UP; | rt->rte_flags &= ~RTF_UP; | ||||
} | } | ||||
/* Finalize notification */ | /* Finalize notification */ | ||||
rnh->rnh_gen++; | rib_bump_gen(rnh); | ||||
if (rnd->rnd_nhop == NULL) | if (rnd->rnd_nhop == NULL) | ||||
rnh->rnh_prefixes--; | rnh->rnh_prefixes--; | ||||
rc->rc_cmd = (rnd->rnd_nhop != NULL) ? RTM_CHANGE : RTM_DELETE; | rc->rc_cmd = (rnd->rnd_nhop != NULL) ? RTM_CHANGE : RTM_DELETE; | ||||
rc->rc_rt = rt; | rc->rc_rt = rt; | ||||
rc->rc_nh_old = nh_orig; | rc->rc_nh_old = nh_orig; | ||||
rc->rc_nh_new = rnd->rnd_nhop; | rc->rc_nh_new = rnd->rnd_nhop; | ||||
rc->rc_nh_weight = rnd->rnd_weight; | rc->rc_nh_weight = rnd->rnd_weight; | ||||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |