[prev in list] [next in list] [prev in thread] [next in thread]
List: keepalived-devel
Subject: [Keepalived-devel] [PATCH] Fix pointer arithmetic for VRRP packet
From: "Ryan O'Hara" <rohara () redhat ! com>
Date: 2012-11-16 21:11:23
Message-ID: 50A6ABFB.4010805 () redhat ! com
[Download RAW message or body]
When using IPSEC AH authentication, the pointer arithmetic used to get
the location of the VRRP packet is incorrect. The address of the IPSEC
header must be cast as (char *) in order to get correct address of the
VRRP packet. Without this patch, vrrp_in_chk() will fail to verify
incoming VRRP packets when IPSEC AH is enabled.
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
---
keepalived/vrrp/vrrp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c
index bbbc1ae..8675309 100644
--- a/keepalived/vrrp/vrrp.c
+++ b/keepalived/vrrp/vrrp.c
@@ -238,7 +238,7 @@ vrrp_in_chk(vrrp_t * vrrp, char *buffer)
if (vrrp->auth_type == VRRP_AUTH_AH) {
ah = (ipsec_ah_t *) (buffer + ihl);
- hd = (vrrphdr_t *) (ah + vrrp_ipsecah_len());
+ hd = (vrrphdr_t *) ((char *) ah + vrrp_ipsecah_len());
} else {
hd = (vrrphdr_t *) (buffer + ihl);
}
--
1.7.1
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Keepalived-devel mailing list
Keepalived-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic