Search
j0ke.net Open Build Service
>
Projects
>
ha
>
keepalived-ipv6
> keepalived-docu-update.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File keepalived-docu-update.patch of Package keepalived-ipv6 (Revision 25)
Currently displaying revision
25
,
show latest
From c02b0ebab4e6f622e914295025807abbe777feee Mon Sep 17 00:00:00 2001 From: Vincent Bernat <bernat@luffy.cx> Date: Wed, 26 Oct 2011 22:18:19 +0000 Subject: vrrp: better documentation of the limitation on password length Patch from Dan Wallis: I've been helping debug a password issue between versions v1.1.15 & v1.1.20, and it turns out that auth_pass is being truncated to eight characters in the former, and seven in the latter. This is later "fixed" to be eight characters again in v1.2.1. This patch makes this maximum length more obvious to the end user, so as to avoid future issues with inadvertent truncation. --- diff --git a/doc/keepalived.conf.SYNOPSIS b/doc/keepalived.conf.SYNOPSIS index 5d79720..7369ef3 100644 --- a/doc/keepalived.conf.SYNOPSIS +++ b/doc/keepalived.conf.SYNOPSIS @@ -170,7 +170,7 @@ vrrp_instance <STRING> { # VRRP instance declaration advert_int <INTEGER> # VRRP Advert interval (use default) authentication { # Authentication block auth_type PASS|AH # Simple Passwd or IPSEC AH - auth_pass <STRING> # Password string + auth_pass <STRING> # Password string (up to 8 characters) } virtual_ipaddress { # VRRP IP addres block <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE> label <LABEL> diff --git a/doc/man/man5/keepalived.conf.5 b/doc/man/man5/keepalived.conf.5 index 09aae3a..53856da 100644 --- a/doc/man/man5/keepalived.conf.5 +++ b/doc/man/man5/keepalived.conf.5 @@ -172,6 +172,7 @@ which will transition together on any state change. auth_type PASS # Password for accessing vrrpd. # should be the same for all machines. + # Only the first eight (8) characters are used. auth_pass 1234 #addresses add|del on change to MASTER, to BACKUP. diff --git a/keepalived/vrrp/vrrp_parser.c b/keepalived/vrrp/vrrp_parser.c index 2b5ed33..5888723 100644 --- a/keepalived/vrrp/vrrp_parser.c +++ b/keepalived/vrrp/vrrp_parser.c @@ -307,8 +307,11 @@ vrrp_auth_pass_handler(vector strvec) int max_size = sizeof (vrrp->auth_data); int str_len = strlen(str); - if (str_len > max_size) + if (str_len > max_size) { str_len = max_size; + log_message(LOG_INFO, + "Truncating auth_pass to %d characters", max_size); + } memset(vrrp->auth_data, 0, max_size); memcpy(vrrp->auth_data, str, str_len); -- cgit v0.8.3.4