summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2003-11-20 19:47:31 +0000
committerandre <andre@FreeBSD.org>2003-11-20 19:47:31 +0000
commit6dca20de0718f19b3cdc5a7d5ebb71cd54b2374e (patch)
treec25b99029c9fbe87aa9d11209da4550fbc910838 /sys/netinet6
parent529995603c4d5d287b1446c3bde04f20544e7640 (diff)
downloadFreeBSD-src-6dca20de0718f19b3cdc5a7d5ebb71cd54b2374e.zip
FreeBSD-src-6dca20de0718f19b3cdc5a7d5ebb71cd54b2374e.tar.gz
Remove RTF_PRCLONING from routing table and adjust users of it
accordingly. The define is left intact for ABI compatibility with userland. This is a pre-step for the introduction of tcp_hostcache. The network stack remains fully useable with this change. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c6
-rw-r--r--sys/netinet6/in6_rmx.c13
-rw-r--r--sys/netinet6/ip6_forward.c5
-rw-r--r--sys/netinet6/ip6_input.c2
4 files changed, 7 insertions, 19 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 96f3640..997474e 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -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)
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 3384da0..09526b2 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -116,16 +116,9 @@ in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
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, struct radix_node_head *head,
* 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, struct radix_node_head *head,
* 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
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index 4f2a35c..508e665 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -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);
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 559828c..0715606 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -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))
OpenPOWER on IntegriCloud