Patch to remove the old IPv6 prefix code from -CURRENT

From: George V. Neville-Neil <gnn_at_neville-neil.com>
Date: Mon, 16 Aug 2004 19:04:34 -0700
Hi Folks,

	Enclosed is a patch against the recent -CURRENT tree which
	removes the in6_prefix code that has already been removed from
	the Kame tree by the Kame team.  I would appreciate it if
	folks could try this out before we include this in our own
	tree.  I have done some testing of this code on my own
	machines, but this is only ping6/traceroute6 and ssh type
	testing.

Thanks,
George


---  sys/conf/files.orig
+++  sys/conf/files
_at__at_ -1502,7 +1502,6 _at__at_
 netinet6/in6_gif.c	optional gif inet6
 netinet6/in6_ifattach.c	optional inet6
 netinet6/in6_pcb.c	optional inet6
-netinet6/in6_prefix.c	optional inet6
 netinet6/in6_proto.c	optional inet6
 netinet6/in6_rmx.c	optional inet6
 netinet6/in6_src.c	optional inet6


---  sys/netinet6/in6.c.orig
+++  sys/netinet6/in6.c
_at__at_ -1151,7 +1151,6 _at__at_
 	struct in6_ifaddr *ia;
 	struct ifnet *ifp;
 {
-	int plen, iilen;
 	struct in6_ifaddr *oia;
 	int	s = splnet();
 
_at__at_ -1171,12 +1170,6 _at__at_
 		}
 	}
 
-	if (oia->ia6_ifpr) {	/* check for safety */
-		plen = in6_mask2len(&oia->ia_prefixmask.sin6_addr, NULL);
-		iilen = (sizeof(oia->ia_prefixmask.sin6_addr) << 3) - plen;
-		in6_prefix_remove_ifid(iilen, oia);
-	}
-
 	/*
 	 * When an autoconfigured address is being removed, release the
 	 * reference to the base prefix.  Also, since the release might


---  sys/netinet6/in6_ifattach.c.orig
+++  sys/netinet6/in6_ifattach.c
_at__at_ -754,9 +754,6 _at__at_
 	struct in6_multi *in6m;
 	struct in6_multi *in6m_next;
 
-	/* nuke prefix list.  this may try to remove some of ifaddrs as well */
-	in6_purgeprefix(ifp);
-
 	/* remove neighbor management table */
 	nd6_purge(ifp);
 


---  sys/netinet6/in6_proto.c.orig
+++  sys/netinet6/in6_proto.c
_at__at_ -102,7 +102,6 _at__at_
 #include <netinet6/udp6_var.h>
 #include <netinet6/pim6_var.h>
 #include <netinet6/nd6.h>
-#include <netinet6/in6_prefix.h>
 
 #ifdef IPSEC
 #include <netinet6/ipsec.h>


---  sys/netinet6/ip6_input.c.orig
+++  sys/netinet6/ip6_input.c
_at__at_ -105,7 +105,6 _at__at_
 #include <netinet6/scope6_var.h>
 #include <netinet6/in6_ifattach.h>
 #include <netinet6/nd6.h>
-#include <netinet6/in6_prefix.h>
 
 #ifdef IPSEC
 #include <netinet6/ipsec.h>
_at__at_ -212,10 +211,6 _at__at_
 	callout_init(&nd6_timer_ch, 0);
 	callout_reset(&nd6_timer_ch, hz, nd6_timer, NULL);
 
-	/* router renumbering prefix list maintenance */
-	callout_init(&in6_rr_timer_ch, 0);
-	callout_reset(&in6_rr_timer_ch, hz, in6_rr_timer, NULL);
-
 	/* timer for regeneranation of temporary addresses randomize ID */
 	callout_init(&in6_tmpaddrtimer_ch, 0);
 	callout_reset(&in6_tmpaddrtimer_ch,


---  sys/netinet6/nd6.c.orig
+++  sys/netinet6/nd6.c
_at__at_ -65,7 +65,6 _at__at_
 #include <netinet/ip6.h>
 #include <netinet6/ip6_var.h>
 #include <netinet6/nd6.h>
-#include <netinet6/in6_prefix.h>
 #include <netinet/icmp6.h>
 
 #include <net/net_osdep.h>
_at__at_ -1410,26 +1409,6 _at__at_
 			i++;
 			pr = pr->ndpr_next;
 		}
-	      {
-		struct rr_prefix *rpp;
-
-		for (rpp = LIST_FIRST(&rr_prefix); rpp;
-		     rpp = LIST_NEXT(rpp, rp_entry)) {
-			if (i >= PRLSTSIZ)
-				break;
-			(void)in6_embedscope(&oprl->prefix[i].prefix,
-			    &pr->ndpr_prefix, NULL, NULL);
-			oprl->prefix[i].raflags = rpp->rp_raf;
-			oprl->prefix[i].prefixlen = rpp->rp_plen;
-			oprl->prefix[i].vltime = rpp->rp_vltime;
-			oprl->prefix[i].pltime = rpp->rp_pltime;
-			oprl->prefix[i].if_index = rpp->rp_ifp->if_index;
-			oprl->prefix[i].expire = rpp->rp_expire;
-			oprl->prefix[i].advrtrs = 0;
-			oprl->prefix[i].origin = rpp->rp_origin;
-			i++;
-		}
-	      }
 		splx(s);
 
 		break;
Received on Tue Aug 17 2004 - 00:06:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:06 UTC