summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2016-09-25 13:54:40 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2016-09-25 13:54:40 +0000
commit9f72f2196b072d29646b1c044a62b59af3321b1b (patch)
treeae55dd2a6ddc1fb1f74c58cc8e985f8234373d99
parentb06bfafcb7b3a984a6ce8aca62bdc39cb44c7622 (diff)
consistently use MAX_ prefix
OK jca
-rw-r--r--usr.sbin/rtadvd/config.c10
-rw-r--r--usr.sbin/rtadvd/rtadvd.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 87fc784aa6d..85d14efedca 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.59 2016/09/25 13:54:00 florian Exp $ */
+/* $OpenBSD: config.c,v 1.60 2016/09/25 13:54:39 florian Exp $ */
/* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */
/*
@@ -176,11 +176,11 @@ getconfig(char *intface)
}
MAYHAVE(val, "rltime", tmp->maxinterval * 3);
- if (val && (val < tmp->maxinterval || val > MAXROUTERLIFETIME)) {
+ if (val && (val < tmp->maxinterval || val > MAX_ROUTERLIFETIME)) {
log_warnx("router lifetime (%ld) on %s is invalid "
"(must be 0 or between %d and %d)",
val, intface,
- tmp->maxinterval, MAXROUTERLIFETIME);
+ tmp->maxinterval, MAX_ROUTERLIFETIME);
exit(1);
}
/*
@@ -201,10 +201,10 @@ getconfig(char *intface)
tmp->lifetime = val & 0xffff;
MAYHAVE(val, "rtime", DEF_ADVREACHABLETIME);
- if (val < 0 || val > MAXREACHABLETIME) {
+ if (val < 0 || val > MAX_REACHABLETIME) {
log_warnx("reachable time (%ld) on %s is invalid"
" (must be no greater than %d)",
- val, intface, MAXREACHABLETIME);
+ val, intface, MAX_REACHABLETIME);
exit(1);
}
tmp->reachabletime = (u_int32_t)val;
diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h
index 69d90b94f4e..18f532b9436 100644
--- a/usr.sbin/rtadvd/rtadvd.h
+++ b/usr.sbin/rtadvd/rtadvd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtadvd.h,v 1.28 2016/09/25 13:54:00 florian Exp $ */
+/* $OpenBSD: rtadvd.h,v 1.29 2016/09/25 13:54:39 florian Exp $ */
/* $KAME: rtadvd.h,v 1.20 2002/05/29 10:13:10 itojun Exp $ */
/*
@@ -44,11 +44,11 @@
#define DEF_ADVVALIDLIFETIME 2592000
#define DEF_ADVPREFERREDLIFETIME 604800
-#define MAXROUTERLIFETIME 9000
+#define MAX_ROUTERLIFETIME 9000
#define MIN_MAXINTERVAL 4
#define MAX_MAXINTERVAL 1800
#define MIN_MININTERVAL 3
-#define MAXREACHABLETIME 3600000
+#define MAX_REACHABLETIME 3600000
#define MAX_INITIAL_RTR_ADVERT_INTERVAL 16
#define MAX_INITIAL_RTR_ADVERTISEMENTS 3