Search
j0ke.net Open Build Service
>
Projects
>
ha
>
keepalived-ipv6
> keepalived-ipv4compare.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File keepalived-ipv4compare.patch of Package keepalived-ipv6 (Revision 25)
Currently displaying revision
25
,
show latest
From bc49a46989c98eb6ee72a379b18b77e87ed624fa Mon Sep 17 00:00:00 2001 From: Vincent Bernat <bernat@luffy.cx> Date: Wed, 07 Dec 2011 09:17:55 +0000 Subject: Fix IPv4 address comparison routine. Two different IPv4 addresses were returned to be equal while this was not the case. Thanks to Ronie Gilberto Henrich for spotting this bug. --- diff --git a/keepalived/include/check_data.h b/keepalived/include/check_data.h index 50a4757..e3ff458 100644 --- a/keepalived/include/check_data.h +++ b/keepalived/include/check_data.h @@ -163,7 +163,7 @@ static inline int sockstorage_equal(const struct sockaddr_storage *s1, struct sockaddr_in *a1 = (struct sockaddr_in *) s1; struct sockaddr_in *a2 = (struct sockaddr_in *) s2; - if ((a1->sin_addr.s_addr == a1->sin_addr.s_addr) && + if ((a1->sin_addr.s_addr == a2->sin_addr.s_addr) && (a1->sin_port == a2->sin_port)) return 1; } -- cgit v0.8.3.4