Index: net/route.c
===================================================================
RCS file: /home/ncvs/src/sys/net/route.c,v
retrieving revision 1.90
diff -u -p -r1.90 route.c
--- net/route.c	8 Nov 2003 23:36:29 -0000	1.90
+++ net/route.c	17 Nov 2003 22:01:26 -0000
@@ -139,7 +139,7 @@ rtalloc1(struct sockaddr *dst, int repor
 		 */
 		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 *
 	 */
 	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 *
 		 * 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 *
 		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 *
 			/*
 			 * 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 *
 				("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
 	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
 #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 so
 	 * 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;
Index: net/route.h
===================================================================
RCS file: /home/ncvs/src/sys/net/route.h,v
retrieving revision 1.52
diff -u -p -r1.52 route.h
--- net/route.h	8 Nov 2003 23:36:30 -0000	1.52
+++ net/route.h	17 Nov 2003 22:01:26 -0000
@@ -151,7 +151,7 @@ struct ortentry {
 #define RTF_PROTO2	0x4000		/* protocol specific routing flag */
 #define RTF_PROTO1	0x8000		/* protocol specific routing flag */
 
-#define RTF_PRCLONING	0x10000		/* protocol requires cloning */
+#define RTF_PRCLONING	0x10000		/* unused, for compatibility */
 #define RTF_WASCLONED	0x20000		/* route generated through cloning */
 #define RTF_PROTO3	0x40000		/* protocol specific routing flag */
 /*			0x80000		   unused */
Index: netinet/in_rmx.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/in_rmx.c,v
retrieving revision 1.49
diff -u -p -r1.49 in_rmx.c
--- netinet/in_rmx.c	14 Nov 2003 21:48:56 -0000	1.49
+++ netinet/in_rmx.c	17 Nov 2003 22:01:26 -0000
@@ -73,15 +73,6 @@ in_addroute(void *v_arg, void *n_arg, st
 	struct radix_node *ret;
 
 	/*
-	 * For IP, all unicast non-host routes are automatically cloning.
-	 */
-	if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
-		rt->rt_flags |= RTF_MULTICAST;
-
-	if (!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST)))
-		rt->rt_flags |= RTF_PRCLONING;
-
-	/*
 	 * A little bit of help for both IP output and input:
 	 *   For host routes, we make sure that RTF_BROADCAST
 	 *   is set for anything that looks like a broadcast address.
@@ -94,8 +85,7 @@ in_addroute(void *v_arg, void *n_arg, st
 	 *
 	 * We also mark routes to multicast addresses as such, because
 	 * it's easy to do and might be useful (but this is much more
-	 * dubious since it's so easy to inspect the address).  (This
-	 * is done above.)
+	 * dubious since it's so easy to inspect the address).
 	 */
 	if (rt->rt_flags & RTF_HOST) {
 		if (in_broadcast(sin->sin_addr, rt->rt_ifp)) {
@@ -105,6 +95,8 @@ in_addroute(void *v_arg, void *n_arg, st
 			rt->rt_flags |= RTF_LOCAL;
 		}
 	}
+	if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr)))
+		rt->rt_flags |= RTF_MULTICAST;
 
 	if (!rt->rt_rmx.rmx_mtu && !(rt->rt_rmx.rmx_locks & RTV_MTU) &&
 	    rt->rt_ifp)
@@ -118,8 +110,7 @@ in_addroute(void *v_arg, void *n_arg, st
 		 * Find out if it is because of an
 		 * ARP entry and delete it if so.
 		 */
-		rt2 = rtalloc1((struct sockaddr *)sin, 0,
-				RTF_CLONING | RTF_PRCLONING);
+		rt2 = rtalloc1((struct sockaddr *)sin, 0, RTF_CLONING);
 		if (rt2) {
 			if (rt2->rt_flags & RTF_LLINFO &&
 			    rt2->rt_flags & RTF_HOST &&
@@ -379,7 +370,7 @@ in_ifadownkill(struct radix_node *rn, vo
 		 * the routes that rtrequest() would have in any case,
 		 * so that behavior is not needed there.
 		 */
-		rt->rt_flags &= ~(RTF_CLONING | RTF_PRCLONING);
+		rt->rt_flags &= ~RTF_CLONING;
 		rtexpunge(rt);
 	}
 	RT_UNLOCK(rt);
Index: netinet/ip_fastfwd.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_fastfwd.c,v
retrieving revision 1.3
diff -u -p -r1.3 ip_fastfwd.c
--- netinet/ip_fastfwd.c	16 Nov 2003 12:50:33 -0000	1.3
+++ netinet/ip_fastfwd.c	17 Nov 2003 22:01:26 -0000
@@ -488,7 +488,7 @@ passin:
 	dst->sin_family = AF_INET;
 	dst->sin_len = sizeof(*dst);
 	dst->sin_addr.s_addr = dest;
-	rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
+	rtalloc_ign(&ro, RTF_CLONING);
 
 	/*
 	 * Route there and interface still up?
@@ -692,7 +692,7 @@ droptoours:	/* Used for DIVERT */
 		dst->sin_family = AF_INET;
 		dst->sin_len = sizeof(*dst);
 		dst->sin_addr.s_addr = dest;
-		rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
+		rtalloc_ign(&ro, RTF_CLONING);
 
 		/*
 		 * Route there and interface still up?
Index: netinet/ip_fw2.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_fw2.c,v
retrieving revision 1.44
diff -u -p -r1.44 ip_fw2.c
--- netinet/ip_fw2.c	14 Nov 2003 21:48:56 -0000	1.44
+++ netinet/ip_fw2.c	17 Nov 2003 22:01:26 -0000
@@ -463,7 +463,7 @@ verify_rev_path(struct in_addr src, stru
 		dst->sin_len = sizeof(*dst);
 		dst->sin_addr = src;
 
-		rtalloc_ign(&ro, RTF_CLONING|RTF_PRCLONING);
+		rtalloc_ign(&ro, RTF_CLONING);
 	}
 
 	if ((ro.ro_rt == NULL) || (ifp == NULL) ||
Index: netinet/ip_icmp.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_icmp.c,v
retrieving revision 1.83
diff -u -p -r1.83 ip_icmp.c
--- netinet/ip_icmp.c	14 Nov 2003 21:48:57 -0000	1.83
+++ netinet/ip_icmp.c	17 Nov 2003 22:01:26 -0000
@@ -415,7 +415,7 @@ icmp_input(m, off)
 			int mtu;
 
 			rt = rtalloc1((struct sockaddr *)&icmpsrc, 0,
-				      RTF_CLONING | RTF_PRCLONING);
+				      RTF_CLONING);
 			if (rt && (rt->rt_flags & RTF_HOST)
 			    && !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
 				mtu = ntohs(icp->icmp_nextmtu);
Index: netinet/ip_input.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.256
diff -u -p -r1.256 ip_input.c
--- netinet/ip_input.c	17 Nov 2003 03:17:49 -0000	1.256
+++ netinet/ip_input.c	17 Nov 2003 22:01:27 -0000
@@ -1621,7 +1621,7 @@ ip_rtaddr(dst)
 	sin->sin_family = AF_INET;
 	sin->sin_len = sizeof(*sin);
 	sin->sin_addr = dst;
-	rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
+	rtalloc_ign(&ro, RTF_CLONING);
 
 	if (ro.ro_rt == 0)
 		return ((struct in_ifaddr *)0);
@@ -1884,7 +1884,7 @@ ip_forward(struct mbuf *m, int srcrt, st
 		sin->sin_family = AF_INET;
 		sin->sin_len = sizeof(*sin);
 		sin->sin_addr = pkt_dst;
-		rtalloc_ign(&ro, (RTF_PRCLONING | RTF_CLONING));
+		rtalloc_ign(&ro, RTF_CLONING);
 
 		rt = ro.ro_rt;
 
Index: netinet/ip_output.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_output.c,v
retrieving revision 1.201
diff -u -p -r1.201 ip_output.c
--- netinet/ip_output.c	14 Nov 2003 21:48:57 -0000	1.201
+++ netinet/ip_output.c	17 Nov 2003 22:01:27 -0000
@@ -311,7 +311,7 @@ ip_output(struct mbuf *m0, struct mbuf *
 		 * for correct operation (as it is for ARP).
 		 */
 		if (ro->ro_rt == 0)
-			rtalloc_ign(ro, RTF_PRCLONING);
+			rtalloc(ro);
 		if (ro->ro_rt == 0) {
 			ipstat.ips_noroute++;
 			error = EHOSTUNREACH;
@@ -940,7 +940,7 @@ spd_done:
 			bcopy(dst, &ro_fwd->ro_dst, sizeof(*dst));
 
 			ro_fwd->ro_rt = 0;
-			rtalloc_ign(ro_fwd, RTF_PRCLONING);
+			rtalloc(ro_fwd);
 
 			if (ro_fwd->ro_rt == 0) {
 				ipstat.ips_noroute++;
Index: netinet6/icmp6.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/icmp6.c,v
retrieving revision 1.48
diff -u -p -r1.48 icmp6.c
--- netinet6/icmp6.c	4 Nov 2003 16:02:02 -0000	1.48
+++ netinet6/icmp6.c	17 Nov 2003 22:01:27 -0000
@@ -1141,8 +1141,7 @@ icmp6_mtudisc_update(ip6cp, validated)
 		    htons(m->m_pkthdr.rcvif->if_index);
 	}
 	/* sin6.sin6_scope_id = XXX: should be set if DST is a scoped addr */
-	rt = rtalloc1((struct sockaddr *)&sin6, 0,
-		      RTF_CLONING | RTF_PRCLONING);
+	rt = rtalloc1((struct sockaddr *)&sin6, 0, RTF_CLONING);
 
 	if (rt && (rt->rt_flags & RTF_HOST) &&
 	    !(rt->rt_rmx.rmx_locks & RTV_MTU)) {
@@ -2135,8 +2134,7 @@ icmp6_reflect(m, off)
 		sin6->sin6_len = sizeof(struct sockaddr_in6);
 		sin6->sin6_addr = ip6->ip6_dst;
 
-		rtalloc_ign((struct route *)&icmp6_reflect_rt.ro_rt,
-			    RTF_PRCLONING);
+		rtalloc((struct route *)&icmp6_reflect_rt.ro_rt);
 	}
 
 	if (icmp6_reflect_rt.ro_rt == 0)
Index: netinet6/in6_rmx.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/in6_rmx.c,v
retrieving revision 1.10
diff -u -p -r1.10 in6_rmx.c
--- netinet6/in6_rmx.c	30 Oct 2003 23:02:51 -0000	1.10
+++ netinet6/in6_rmx.c	17 Nov 2003 22:01:28 -0000
@@ -116,16 +116,9 @@ in6_addroute(void *v_arg, void *n_arg, s
 	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)rt_key(rt);
 	struct radix_node *ret;
 
-	/*
-	 * For IPv6, all unicast non-host routes are automatically cloning.
-	 */
 	if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
 		rt->rt_flags |= RTF_MULTICAST;
 
-	if (!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST))) {
-		rt->rt_flags |= RTF_PRCLONING;
-	}
-
 	/*
 	 * A little bit of help for both IPv6 output and input:
 	 *   For local addresses, we make sure that RTF_LOCAL is set,
@@ -160,8 +153,7 @@ in6_addroute(void *v_arg, void *n_arg, s
 		 * Find out if it is because of an
 		 * ARP entry and delete it if so.
 		 */
-		rt2 = rtalloc1((struct sockaddr *)sin6, 0,
-				RTF_CLONING | RTF_PRCLONING);
+		rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING);
 		if (rt2) {
 			if (rt2->rt_flags & RTF_LLINFO &&
 				rt2->rt_flags & RTF_HOST &&
@@ -188,8 +180,7 @@ in6_addroute(void *v_arg, void *n_arg, s
 		 *	net route entry, 3ffe:0501:: -> if0.
 		 *	This case should not raise an error.
 		 */
-		rt2 = rtalloc1((struct sockaddr *)sin6, 0,
-				RTF_CLONING | RTF_PRCLONING);
+		rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING);
 		if (rt2) {
 			if ((rt2->rt_flags & (RTF_CLONING|RTF_HOST|RTF_GATEWAY))
 					== RTF_CLONING
Index: netinet6/ip6_forward.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/ip6_forward.c,v
retrieving revision 1.23
diff -u -p -r1.23 ip6_forward.c
--- netinet6/ip6_forward.c	4 Nov 2003 16:02:02 -0000	1.23
+++ netinet6/ip6_forward.c	17 Nov 2003 22:01:28 -0000
@@ -343,8 +343,7 @@ ip6_forward(m, srcrt)
 			}
 
 			/* this probably fails but give it a try again */
-			rtalloc_ign((struct route *)&ip6_forward_rt,
-				    RTF_PRCLONING);
+			rtalloc((struct route *)&ip6_forward_rt);
 		}
 
 		if (ip6_forward_rt.ro_rt == 0) {
@@ -368,7 +367,7 @@ ip6_forward(m, srcrt)
 		dst->sin6_family = AF_INET6;
 		dst->sin6_addr = ip6->ip6_dst;
 
-  		rtalloc_ign((struct route *)&ip6_forward_rt, RTF_PRCLONING);
+  		rtalloc((struct route *)&ip6_forward_rt);
 		if (ip6_forward_rt.ro_rt == 0) {
 			ip6stat.ip6s_noroute++;
 			in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_noroute);
Index: netinet6/ip6_input.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet6/ip6_input.c,v
retrieving revision 1.66
diff -u -p -r1.66 ip6_input.c
--- netinet6/ip6_input.c	8 Nov 2003 22:28:40 -0000	1.66
+++ netinet6/ip6_input.c	17 Nov 2003 22:01:28 -0000
@@ -499,7 +499,7 @@ ip6_input(m)
 		dst6->sin6_family = AF_INET6;
 		dst6->sin6_addr = ip6->ip6_dst;
 
-		rtalloc_ign((struct route *)&ip6_forward_rt, RTF_PRCLONING);
+		rtalloc((struct route *)&ip6_forward_rt);
 	}
 
 #define rt6_key(r) ((struct sockaddr_in6 *)((r)->rt_nodes->rn_key))
