Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ndp Teach ndp(8) about override_rtadv.



details:   https://anonhg.NetBSD.org/src/rev/423025118006
branches:  trunk
changeset: 748844:423025118006
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Nov 06 20:51:19 2009 +0000

description:
Teach ndp(8) about override_rtadv.

diffstat:

 usr.sbin/ndp/ndp.8 |  21 +++++++++++++++++----
 usr.sbin/ndp/ndp.c |   9 ++++++++-
 2 files changed, 25 insertions(+), 5 deletions(-)

diffs (67 lines):

diff -r f6c137f6d905 -r 423025118006 usr.sbin/ndp/ndp.8
--- a/usr.sbin/ndp/ndp.8        Fri Nov 06 20:41:22 2009 +0000
+++ b/usr.sbin/ndp/ndp.8        Fri Nov 06 20:51:19 2009 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: ndp.8,v 1.23 2009/03/11 18:52:54 joerg Exp $
+.\"    $NetBSD: ndp.8,v 1.24 2009/11/06 20:51:19 dyoung Exp $
 .\"    $KAME: ndp.8,v 1.33 2005/10/19 14:57:42 suz Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -180,11 +180,24 @@
 Specify whether or not to accept Router Advertisement messages
 received on the
 .Ar interface .
-Note that the kernel does not accept Router Advertisement messages
-unless the
+Note that the kernel does not accept Router Advertisement messages,
+even if the flag
+.Ic accept_rtadv
+is on, unless either the
 .Li net.inet6.ip6.accept_rtadv
-variable is non-0, even if the flag is on.
+variable is non-0, or the flag
+.Ic override_rtadv
+is on.
 This flag is set to 1 by default.
+.It Ic override_rtadv
+Specify whether or not to override the
+.Li net.inet6.ip6.accept_rtadv
+variable.
+If the flag is on, then it will suffice to set the flag
+.Ic accept_rtadv
+to make the kernel accept Router Advertisement messages on the
+.Ar interface .
+This flag is set to 0 by default.
 .It Ic prefer_source
 Prefer addresses on the
 .Ar interface
diff -r f6c137f6d905 -r 423025118006 usr.sbin/ndp/ndp.c
--- a/usr.sbin/ndp/ndp.c        Fri Nov 06 20:41:22 2009 +0000
+++ b/usr.sbin/ndp/ndp.c        Fri Nov 06 20:51:19 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ndp.c,v 1.37 2007/01/16 17:32:04 hubertf Exp $ */
+/*     $NetBSD: ndp.c,v 1.38 2009/11/06 20:51:19 dyoung Exp $  */
 /*     $KAME: ndp.c,v 1.121 2005/07/13 11:30:13 keiichi Exp $  */
 
 /*
@@ -941,6 +941,9 @@
 #ifdef ND6_IFF_ACCEPT_RTADV
                SETFLAG("accept_rtadv", ND6_IFF_ACCEPT_RTADV);
 #endif
+#ifdef ND6_IFF_OVERRIDE_RTADV
+               SETFLAG("override_rtadv", ND6_IFF_OVERRIDE_RTADV);
+#endif
 #ifdef ND6_IFF_PREFER_SOURCE
                SETFLAG("prefer_source", ND6_IFF_PREFER_SOURCE);
 #endif
@@ -1015,6 +1018,10 @@
                if ((ND.flags & ND6_IFF_ACCEPT_RTADV))
                        (void)printf("accept_rtadv ");
 #endif
+#ifdef ND6_IFF_OVERRIDE_RTADV
+               if ((ND.flags & ND6_IFF_OVERRIDE_RTADV))
+                       (void)printf("override_rtadv ");
+#endif
 #ifdef ND6_IFF_PREFER_SOURCE
                if ((ND.flags & ND6_IFF_PREFER_SOURCE))
                        (void)printf("prefer_source ");



Home | Main Index | Thread Index | Old Index