remove unneeded checks of accept_rtadv. from kame

This commit is contained in:
itojun 2003-06-24 07:54:47 +00:00
parent adb5d5afb4
commit 6d4a3c4191
4 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.c,v 1.93 2003/06/24 07:39:24 itojun Exp $ */
/* $NetBSD: icmp6.c,v 1.94 2003/06/24 07:54:47 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.93 2003/06/24 07:39:24 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.94 2003/06/24 07:54:47 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -2420,7 +2420,7 @@ icmp6_redirect_output(m0, rt)
icmp6_errcount(&icmp6stat.icp6s_outerrhist, ND_REDIRECT, 0);
/* if we are not router, we don't send icmp6 redirect */
if (!ip6_forwarding || ip6_accept_rtadv)
if (!ip6_forwarding)
goto fail;
/* sanity check */

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6.c,v 1.84 2003/06/24 07:49:03 itojun Exp $ */
/* $NetBSD: nd6.c,v 1.85 2003/06/24 07:54:48 itojun Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.84 2003/06/24 07:49:03 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.85 2003/06/24 07:54:48 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -815,7 +815,7 @@ nd6_free(rt, gc)
* even though it is not harmful, it was not really necessary.
*/
if (!ip6_forwarding && ip6_accept_rtadv) { /* XXX: too restrictive? */
if (!ip6_forwarding) {
int s;
s = splsoftnet();
dr = defrouter_lookup(&((struct sockaddr_in6 *)rt_key(rt))->sin6_addr,

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_nbr.c,v 1.45 2003/06/24 07:39:26 itojun Exp $ */
/* $NetBSD: nd6_nbr.c,v 1.46 2003/06/24 07:54:48 itojun Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.45 2003/06/24 07:39:26 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.46 2003/06/24 07:54:48 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -781,7 +781,7 @@ nd6_na_input(m, off, icmp6len)
dr = defrouter_lookup(in6, rt->rt_ifp);
if (dr)
defrtrlist_del(dr);
else if (!ip6_forwarding && ip6_accept_rtadv) {
else if (!ip6_forwarding) {
/*
* Even if the neighbor is not in the default
* router list, the neighbor may be used

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_rtr.c,v 1.43 2003/06/24 07:39:27 itojun Exp $ */
/* $NetBSD: nd6_rtr.c,v 1.44 2003/06/24 07:54:48 itojun Exp $ */
/* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */
/*
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.43 2003/06/24 07:39:27 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.44 2003/06/24 07:54:48 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -117,7 +117,7 @@ nd6_rs_input(m, off, icmp6len)
union nd_opts ndopts;
/* If I'm not a router, ignore it. */
if (ip6_accept_rtadv != 0 || ip6_forwarding != 1)
if (ip6_accept_rtadv != 0 || !ip6_forwarding)
goto freeit;
/* Sanity checks */