diff options
author | 2013-03-17 00:38:29 +0000 | |
---|---|---|
committer | 2013-03-17 00:38:29 +0000 | |
commit | 28e15b526ca58e0ffd805fb1e901fc74247cee2d (patch) | |
tree | fc3b04109473a44c9ad1cf8a4573d56e4b876414 | |
parent | - Apply the AcceptPerfectMatch workaround for DP83815 chipsets to the 15D (diff) | |
download | wireguard-openbsd-28e15b526ca58e0ffd805fb1e901fc74247cee2d.tar.xz wireguard-openbsd-28e15b526ca58e0ffd805fb1e901fc74247cee2d.zip |
Add the router preference defines to the icmp6.h header and remove the
defines that were part of rtadvd's code.
ok bluhm@
-rw-r--r-- | sys/netinet/icmp6.h | 10 | ||||
-rw-r--r-- | usr.sbin/rtadvd/config.c | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 58476b69aad..c8e2d0ba332 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: icmp6.h,v 1.34 2012/07/08 10:45:46 phessler Exp $ */ +/* $OpenBSD: icmp6.h,v 1.35 2013/03/17 00:38:29 brad Exp $ */ /* $KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $ */ /* @@ -224,6 +224,14 @@ struct nd_router_advert { /* router advertisement */ #define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1] #define ND_RA_FLAG_MANAGED 0x80 #define ND_RA_FLAG_OTHER 0x40 + +#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ + +#define ND_RA_FLAG_RTPREF_HIGH 0x08 /* 00001000 */ +#define ND_RA_FLAG_RTPREF_MEDIUM 0x00 /* 00000000 */ +#define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ +#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ + #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit { /* neighbor solicitation */ diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index 0424d946cee..3c72a6db83b 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.30 2012/09/05 05:52:10 deraadt Exp $ */ +/* $OpenBSD: config.c,v 1.31 2013/03/17 00:38:29 brad Exp $ */ /* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */ /* @@ -166,10 +166,6 @@ getconfig(intface) MAYHAVE(val, "raflags", 0); tmp->managedflg = val & ND_RA_FLAG_MANAGED; tmp->otherflg = val & ND_RA_FLAG_OTHER; -#ifndef ND_RA_FLAG_RTPREF_MASK -#define ND_RA_FLAG_RTPREF_MASK 0x18 /* 00011000 */ -#define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ -#endif tmp->rtpref = val & ND_RA_FLAG_RTPREF_MASK; if (tmp->rtpref == ND_RA_FLAG_RTPREF_RSV) { log_warnx("invalid router preference (%02x) on %s", |