Author: loos Date: Mon Feb 2 11:42:35 2015 New Revision: 278075 URL: https://svnweb.freebsd.org/changeset/base/278075
Log: MFC r276751: Remove the check that prevent carp(4) advskew to be set to '0'. CARP devices are created with advskew set to '0' and once you set it to any other value in the valid range (0..254) you can't set it back to zero. The code in question is also used to prevent that zeroed values overwrite the CARP defaults when a new CARP device is created. Since advskew already defaults to '0' for newly created devices and the new value is guaranteed to be within the valid range, it is safe to overwrite it here. PR: 194672 Reported by: [email protected] Modified: stable/10/sys/netinet/ip_carp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_carp.c ============================================================================== --- stable/10/sys/netinet/ip_carp.c Mon Feb 2 11:32:15 2015 (r278074) +++ stable/10/sys/netinet/ip_carp.c Mon Feb 2 11:42:35 2015 (r278075) @@ -1701,13 +1701,11 @@ carp_ioctl(struct ifreq *ifr, u_long cmd } sc->sc_advbase = carpr.carpr_advbase; } - if (carpr.carpr_advskew > 0) { - if (carpr.carpr_advskew >= 255) { - error = EINVAL; - break; - } - sc->sc_advskew = carpr.carpr_advskew; + if (carpr.carpr_advskew >= 255) { + error = EINVAL; + break; } + sc->sc_advskew = carpr.carpr_advskew; if (carpr.carpr_key[0] != '\0') { bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key)); carp_hmac_prepare(sc); _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "[email protected]"
