summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_carp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 232e0133814..5252c1b3e4c 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.2 2003/10/19 03:58:25 david Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.3 2003/10/20 00:43:58 mcbride Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -981,20 +981,17 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
sc->sc_ac.ac_enaddr[5] = sc->sc_vhid;
error--;
}
- if (carpr.carpr_advskew > 0) {
- if (carpr.carpr_advskew >= 255 || sc->sc_advskew == 0) {
+ if (carpr.carpr_advbase > 0 || carpr.carpr_advskew > 0) {
+ if (carpr.carpr_advskew >= 255) {
error = EINVAL;
break;
}
- sc->sc_advskew = carpr.carpr_advskew;
- error--;
- }
- if (carpr.carpr_advbase > 0) {
if (carpr.carpr_advbase > 255) {
error = EINVAL;
break;
}
sc->sc_advbase = carpr.carpr_advbase;
+ sc->sc_advskew = carpr.carpr_advskew;
error--;
}
bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key));