diff options
author | ume <ume@FreeBSD.org> | 2013-01-09 18:18:08 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2013-01-09 18:18:08 +0000 |
commit | e33acd92c323d70e5d6df57f002fc99962711614 (patch) | |
tree | d47e3ff0e4eea1ed47efa711fb58f1061db36182 /usr.sbin/ndp | |
parent | dc876f51b7413aaa22e802a6b7fd911229c8f410 (diff) | |
download | FreeBSD-src-e33acd92c323d70e5d6df57f002fc99962711614.zip FreeBSD-src-e33acd92c323d70e5d6df57f002fc99962711614.tar.gz |
Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.
Requested by: hrs
Reviewed by: IHANet folks including hrs
MFC after: 1 week
Diffstat (limited to 'usr.sbin/ndp')
-rw-r--r-- | usr.sbin/ndp/ndp.8 | 11 | ||||
-rw-r--r-- | usr.sbin/ndp/ndp.c | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/ndp/ndp.8 b/usr.sbin/ndp/ndp.8 index 9eabfe4..223cfba 100644 --- a/usr.sbin/ndp/ndp.8 +++ b/usr.sbin/ndp/ndp.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2012 +.Dd Jan 10, 2013 .Dt NDP 8 .Os .\" @@ -192,6 +192,15 @@ on This flag is set by .Va net.inet6.ip6.auto_linklocal sysctl variable. +.It Ic no_prefer_iface +The address on the outgoing interface is preferred by source addess +selection rule. +If this flag is set, stop treating the address on the +.Ar interface +as special even when the +.Ar interface +is outgoing interface. +The default value of this flag is off. .It Ic disabled Disable IPv6 operation on the interface. When disabled, the interface discards any IPv6 packets diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index b50ddb7..866da76 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -982,6 +982,9 @@ ifinfo(ifname, argc, argv) #ifdef ND6_IFF_AUTO_LINKLOCAL SETFLAG("auto_linklocal", ND6_IFF_AUTO_LINKLOCAL); #endif +#ifdef ND6_IFF_NO_PREFER_IFACE + SETFLAG("no_prefer_iface", ND6_IFF_NO_PREFER_IFACE); +#endif SETVALUE("basereachable", ND.basereachable); SETVALUE("retrans", ND.retrans); SETVALUE("curhlim", ND.chlim); @@ -1055,6 +1058,10 @@ ifinfo(ifname, argc, argv) if ((ND.flags & ND6_IFF_AUTO_LINKLOCAL)) printf("auto_linklocal "); #endif +#ifdef ND6_IFF_NO_PREFER_IFACE + if ((ND.flags & ND6_IFF_NO_PREFER_IFACE)) + printf("no_prefer_iface "); +#endif } putc('\n', stdout); #undef ND |