diff options
| author | Andre Oppermann <andre@FreeBSD.org> | 2003-11-20 19:47:31 +0000 |
|---|---|---|
| committer | Andre Oppermann <andre@FreeBSD.org> | 2003-11-20 19:47:31 +0000 |
| commit | 26d02ca7babf8bb8d1e2b9c8cb3e18ec0fcd1317 (patch) | |
| tree | c25b99029c9fbe87aa9d11209da4550fbc910838 /sys/netinet | |
| parent | 3257da0c40e25a88c1430f47df9554f8ddc4baad (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/in_rmx.c | 19 | ||||
| -rw-r--r-- | sys/netinet/ip_fastfwd.c | 4 | ||||
| -rw-r--r-- | sys/netinet/ip_fw2.c | 2 | ||||
| -rw-r--r-- | sys/netinet/ip_icmp.c | 2 | ||||
| -rw-r--r-- | sys/netinet/ip_input.c | 4 | ||||
| -rw-r--r-- | sys/netinet/ip_output.c | 4 |
6 files changed, 13 insertions, 22 deletions
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c index b33094e5443a8..4625030c7e902 100644 --- a/sys/netinet/in_rmx.c +++ b/sys/netinet/in_rmx.c @@ -73,15 +73,6 @@ in_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, 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, struct radix_node_head *head, * * 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, struct radix_node_head *head, 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, struct radix_node_head *head, * 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, void *xap) * 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); diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index f831b392d6eb4..667a04c2281f0 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -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? diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 3682264c21937..5d3e3dae1dfc2 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -463,7 +463,7 @@ verify_rev_path(struct in_addr src, struct ifnet *ifp) 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) || diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 12c6c42081c98..f94e7b98a3d0e 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -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); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index e582864432066..df67d225feddc 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -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, struct sockaddr_in *next_hop) 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; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 64d4a7009f173..cdf8b8718495e 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -311,7 +311,7 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, * 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++; |
