diff options
Diffstat (limited to 'sys/net/route.c')
| -rw-r--r-- | sys/net/route.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index 648fa321d8de..b625e7a52951 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -139,7 +139,7 @@ rtalloc1(struct sockaddr *dst, int report, u_long ignflags) */ newrt = rt = (struct rtentry *)rn; nflags = rt->rt_flags & ~ignflags; - if (report && (nflags & (RTF_CLONING | RTF_PRCLONING))) { + if (report && (nflags & RTF_CLONING)) { /* * We are apparently adding (report = 0 in delete). * If it requires that it be cloned, do so. @@ -584,7 +584,7 @@ rtexpunge(struct rtentry *rt) * Now search what's left of the subtree for any cloned * routes which might have been formed from this node. */ - if ((rt->rt_flags & (RTF_CLONING | RTF_PRCLONING)) && rt_mask(rt)) + if ((rt->rt_flags & RTF_CLONING) && rt_mask(rt)) rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt), rt_fixdelete, rt); @@ -647,7 +647,7 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) */ if (flags & RTF_HOST) { netmask = 0; - flags &= ~(RTF_CLONING | RTF_PRCLONING); + flags &= ~RTF_CLONING; } switch (req) { case RTM_DELETE: @@ -669,7 +669,7 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) * Now search what's left of the subtree for any cloned * routes which might have been formed from this node. */ - if ((rt->rt_flags & (RTF_CLONING | RTF_PRCLONING)) && + if ((rt->rt_flags & RTF_CLONING) && rt_mask(rt)) { rnh->rnh_walktree_from(rnh, dst, rt_mask(rt), rt_fixdelete, rt); @@ -716,7 +716,7 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) ifa = rt->rt_ifa; /* XXX locking? */ flags = rt->rt_flags & - ~(RTF_CLONING | RTF_PRCLONING | RTF_STATIC); + ~(RTF_CLONING | RTF_STATIC); flags |= RTF_WASCLONED; gateway = rt->rt_gateway; if ((netmask = rt->rt_genmask) == 0) @@ -777,11 +777,11 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) /* * Uh-oh, we already have one of these in the tree. * We do a special hack: if the route that's already - * there was generated by the protocol-cloning - * mechanism, then we just blow it away and retry - * the insertion of the new one. + * there was generated by the cloning mechanism + * then we just blow it away and retry the insertion + * of the new one. */ - rt2 = rtalloc1(dst, 0, RTF_PRCLONING); + rt2 = rtalloc1(dst, 0, 0); if (rt2 && rt2->rt_parent) { rtexpunge(rt2); RT_UNLOCK(rt2); @@ -820,7 +820,7 @@ rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt) ("no route to clone from")); rt->rt_rmx = (*ret_nrt)->rt_rmx; /* copy metrics */ rt->rt_rmx.rmx_pksent = 0; /* reset packet counter */ - if ((*ret_nrt)->rt_flags & (RTF_CLONING | RTF_PRCLONING)) { + if ((*ret_nrt)->rt_flags & RTF_CLONING) { /* * NB: We do not bump the refcnt on the parent * entry under the assumption that it will @@ -896,7 +896,7 @@ rt_fixdelete(struct radix_node *rn, void *vp) struct rtentry *rt0 = vp; if (rt->rt_parent == rt0 && - !(rt->rt_flags & (RTF_PINNED | RTF_CLONING | RTF_PRCLONING))) { + !(rt->rt_flags & (RTF_PINNED | RTF_CLONING))) { return rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, rt_mask(rt), rt->rt_flags, (struct rtentry **)0); @@ -937,7 +937,7 @@ rt_fixchange(struct radix_node *rn, void *vp) #endif if (!rt->rt_parent || - (rt->rt_flags & (RTF_PINNED | RTF_CLONING | RTF_PRCLONING))) { + (rt->rt_flags & (RTF_PINNED | RTF_CLONING))) { #ifdef DEBUG if(rtfcdebug) printf("no parent, pinned or cloning\n"); #endif @@ -1087,10 +1087,11 @@ rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate) * correct choice anyway), and avoid the resulting reference loops * by disallowing any route to run through itself as a gateway. * This is obviously mandatory when we get rt->rt_output(). + * XXX: After removal of PRCLONING this is probably not needed anymore. */ if (rt->rt_flags & RTF_GATEWAY) { /* XXX LOR here */ - rt->rt_gwroute = rtalloc1(gate, 1, RTF_PRCLONING); + rt->rt_gwroute = rtalloc1(gate, 1, 0); if (rt->rt_gwroute == rt) { RTFREE_LOCKED(rt->rt_gwroute); rt->rt_gwroute = 0; |
