make net.inet6.ip6.redirect actually work. from Tomoyuki Sahara via kame
This commit is contained in:
parent
291a252c2e
commit
da53b9c28e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in6_proto.c,v 1.47 2003/04/17 19:58:57 thorpej Exp $ */
|
||||
/* $NetBSD: in6_proto.c,v 1.48 2003/08/07 08:52:32 itojun Exp $ */
|
||||
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -66,7 +66,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.47 2003/04/17 19:58:57 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.48 2003/08/07 08:52:32 itojun Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
@ -256,12 +256,8 @@ struct domain inet6domain =
|
||||
#endif /* GATEWAY6 */
|
||||
#endif /* !IPV6FORWARDING */
|
||||
|
||||
#ifndef IPV6_SENDREDIRECTS
|
||||
#define IPV6_SENDREDIRECTS 1
|
||||
#endif
|
||||
|
||||
int ip6_forwarding = IPV6FORWARDING; /* act as router? */
|
||||
int ip6_sendredirects = IPV6_SENDREDIRECTS;
|
||||
int ip6_sendredirects = 1;
|
||||
int ip6_defhlim = IPV6_DEFHLIM;
|
||||
int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
|
||||
int ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip6_forward.c,v 1.35 2003/07/03 05:03:55 itojun Exp $ */
|
||||
/* $NetBSD: ip6_forward.c,v 1.36 2003/08/07 08:52:33 itojun Exp $ */
|
||||
/* $KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $ */
|
||||
|
||||
/*
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.35 2003/07/03 05:03:55 itojun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.36 2003/08/07 08:52:33 itojun Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
#include "opt_pfil_hooks.h"
|
||||
@ -439,7 +439,7 @@ ip6_forward(m, srcrt)
|
||||
* Also, don't send redirect if forwarding using a route
|
||||
* modified by a redirect.
|
||||
*/
|
||||
if (rt->rt_ifp == m->m_pkthdr.rcvif && !srcrt &&
|
||||
if (rt->rt_ifp == m->m_pkthdr.rcvif && !srcrt && ip6_sendredirects &&
|
||||
(rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0) {
|
||||
if ((rt->rt_ifp->if_flags & IFF_POINTOPOINT) &&
|
||||
nd6_is_addr_neighbor((struct sockaddr_in6 *)&ip6_forward_rt.ro_dst, rt->rt_ifp)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip6_var.h,v 1.27 2003/07/08 07:20:11 itojun Exp $ */
|
||||
/* $NetBSD: ip6_var.h,v 1.28 2003/08/07 08:52:33 itojun Exp $ */
|
||||
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
@ -217,6 +217,7 @@ extern u_int32_t ip6_id; /* fragment identifier */
|
||||
extern int ip6_defhlim; /* default hop limit */
|
||||
extern int ip6_defmcasthlim; /* default multicast hop limit */
|
||||
extern int ip6_forwarding; /* act as router? */
|
||||
extern int ip6_sendredirect; /* send ICMPv6 redirect? */
|
||||
extern int ip6_forward_srcrt; /* forward src-routed? */
|
||||
extern int ip6_use_deprecated; /* allow deprecated addr as source */
|
||||
extern int ip6_rr_prune; /* router renumbering prefix
|
||||
|
Loading…
Reference in New Issue
Block a user