Permalink
Browse files

keepalived-1.1.3

* keepalived-1.1.3 released.
* Stephan von Krawczynski, <skraw@ithnet.com> extended ip
  address framework to support broadcast address selection.
* Extended the scheduling framework to support plain 'long'
  timer. Visited the layer4 framework to support this new
  scheduling scheme. Reviewed the checkers and VRRP framework
  to support long timer.
* VRRP : Removed the timer micro adjust call. Its use is
  obsolete with the new scheduling 'long' timer support.
* Jacob Rief, <Jacob.Rief@tiscover.com> and I added support
  log level selection for main daemon. A new command line
  argument has been created :
  --log-facility  -S  0-7 Set syslog facility to
                      LOG_LOCAL[0-7]. (default=LOG_DAEMON)
* Extended the HTTP checker to support non blocking read
  while processing stream. NONBLOCK flags is set before
  read operation to catch EAGAIN error.
* VRRP : Diego Rivera, <lrivera@racsa.co.cr> and I fixed a
  notify issue while building notify exec string.
* VRRP : Diego Rivera, <lrivera@racsa.co.cr> and I extended
  FSM to support BACKUP state notifiers and smtp_alert call
  during VRRP initialization.
* Jan Vanhercke, <jan.vanhercke@c-cure.be> and I extended
  scheduling timer computation to support micro-sec second
  overlap. Extended the whole scheduling framework to support
  this scheduling scheme while computing thread timers.
* Fixed scheduling framework to support child thread timers
  while computing global scheduling timer.
  • Loading branch information...
1 parent 6b2cf7c commit c2f69b09c2d15186db57c74f8f84de2f92bf4c14 Alexandre Cassen committed Sep 29, 2003
Showing with 481 additions and 409 deletions.
  1. +30 −0 ChangeLog
  2. +2 −1 README
  3. +1 −1 VERSION
  4. +6 −6 doc/keepalived.conf.SYNOPSIS
  5. +17 −18 genhash/http.c
  6. +4 −4 genhash/http.h
  7. +8 −15 genhash/layer4.c
  8. +7 −7 genhash/layer4.h
  9. +4 −5 genhash/main.c
  10. +1 −1 genhash/main.h
  11. +9 −7 genhash/sock.c
  12. +1 −1 genhash/sock.h
  13. +2 −3 genhash/ssl.c
  14. +1 −1 keepalived.spec
  15. +1 −1 keepalived/check/check_api.c
  16. +1 −1 keepalived/check/check_ci.c
  17. +2 −2 keepalived/check/check_daemon.c
  18. +1 −1 keepalived/check/check_data.c
  19. +26 −7 keepalived/check/check_http.c
  20. +3 −3 keepalived/check/check_misc.c
  21. +1 −1 keepalived/check/check_parser.c
  22. +1 −1 keepalived/check/check_ssl.c
  23. +3 −3 keepalived/check/check_tcp.c
  24. +1 −1 keepalived/check/ipfwwrapper.c
  25. +1 −1 keepalived/check/ipvswrapper.c
  26. +1 −1 keepalived/check/ipwrapper.c
  27. +2 −2 keepalived/core/daemon.c
  28. +25 −20 keepalived/core/global_data.c
  29. +2 −2 keepalived/core/global_parser.c
  30. +5 −12 keepalived/core/layer4.c
  31. +24 −7 keepalived/core/main.c
  32. +3 −3 keepalived/core/pidfile.c
  33. +57 −52 keepalived/core/smtp.c
  34. +1 −1 keepalived/include/check_api.h
  35. +1 −1 keepalived/include/check_ci.h
  36. +1 −1 keepalived/include/check_daemon.h
  37. +1 −1 keepalived/include/check_data.h
  38. +4 −4 keepalived/include/check_http.h
  39. +2 −2 keepalived/include/check_misc.h
  40. +1 −1 keepalived/include/check_parser.h
  41. +1 −1 keepalived/include/check_ssl.h
  42. +1 −1 keepalived/include/check_tcp.h
  43. +1 −1 keepalived/include/daemon.h
  44. +4 −3 keepalived/include/global_data.h
  45. +1 −1 keepalived/include/global_parser.h
  46. +1 −1 keepalived/include/ipfwwrapper.h
  47. +5 −4 keepalived/include/ipvswrapper.h
  48. +4 −5 keepalived/include/ipwrapper.h
  49. +8 −8 keepalived/include/layer4.h
  50. +14 −12 keepalived/include/main.h
  51. +1 −1 keepalived/include/pidfile.h
  52. +2 −2 keepalived/include/smtp.h
  53. +14 −14 keepalived/include/vrrp.h
  54. +9 −9 keepalived/include/vrrp_arp.h
  55. +1 −1 keepalived/include/vrrp_daemon.h
  56. +1 −1 keepalived/include/vrrp_data.h
  57. +13 −13 keepalived/include/vrrp_if.h
  58. +1 −1 keepalived/include/vrrp_index.h
  59. +4 −3 keepalived/include/vrrp_ipaddress.h
  60. +1 −1 keepalived/include/vrrp_iproute.h
  61. +1 −1 keepalived/include/vrrp_ipsecah.h
  62. +5 −2 keepalived/include/vrrp_netlink.h
  63. +1 −1 keepalived/include/vrrp_notify.h
  64. +1 −1 keepalived/include/vrrp_parser.h
  65. +1 −1 keepalived/include/vrrp_scheduler.h
  66. +2 −1 keepalived/include/vrrp_sync.h
  67. +1 −1 keepalived/include/vrrp_track.h
  68. +1 −1 keepalived/vrrp/vrrp.c
  69. +1 −1 keepalived/vrrp/vrrp_arp.c
  70. +2 −2 keepalived/vrrp/vrrp_daemon.c
  71. +4 −3 keepalived/vrrp/vrrp_data.c
  72. +1 −1 keepalived/vrrp/vrrp_if.c
  73. +1 −1 keepalived/vrrp/vrrp_index.c
  74. +8 −2 keepalived/vrrp/vrrp_ipaddress.c
  75. +1 −1 keepalived/vrrp/vrrp_iproute.c
  76. +1 −1 keepalived/vrrp/vrrp_ipsecah.c
  77. +1 −1 keepalived/vrrp/vrrp_netlink.c
  78. +8 −5 keepalived/vrrp/vrrp_notify.c
  79. +2 −2 keepalived/vrrp/vrrp_parser.c
  80. +15 −2 keepalived/vrrp/vrrp_scheduler.c
  81. +17 −33 keepalived/vrrp/vrrp_sync.c
  82. +1 −1 keepalived/vrrp/vrrp_track.c
  83. +1 −1 lib/html.c
  84. +1 −1 lib/html.h
  85. +1 −1 lib/list.c
  86. +1 −1 lib/list.h
  87. +1 −1 lib/memory.c
  88. +1 −1 lib/memory.h
  89. +1 −1 lib/notify.c
  90. +1 −1 lib/notify.h
  91. +1 −1 lib/parser.c
  92. +1 −1 lib/parser.h
  93. +13 −37 lib/scheduler.c
  94. +2 −2 lib/scheduler.h
  95. +19 −1 lib/timer.c
  96. +3 −2 lib/timer.h
  97. +1 −1 lib/utils.c
  98. +1 −1 lib/utils.h
  99. +1 −1 lib/vector.c
  100. +1 −1 lib/vector.h
  101. +1 −1 lib/watchdog.c
  102. +2 −2 lib/watchdog.h
View
@@ -1,3 +1,33 @@
+2003-09-29 Alexandre Cassen <acassen@linux-vs.org>
+ * keepalived-1.1.3 released.
+ * Stephan von Krawczynski, <skraw@ithnet.com> extended ip
+ address framework to support broadcast address selection.
+ * Extended the scheduling framework to support plain 'long'
+ timer. Visited the layer4 framework to support this new
+ scheduling scheme. Reviewed the checkers and VRRP framework
+ to support long timer.
+ * VRRP : Removed the timer micro adjust call. Its use is
+ obsolete with the new scheduling 'long' timer support.
+ * Jacob Rief, <Jacob.Rief@tiscover.com> and I added support
+ log level selection for main daemon. A new command line
+ argument has been created :
+ --log-facility -S 0-7 Set syslog facility to
+ LOG_LOCAL[0-7]. (default=LOG_DAEMON)
+ * Extended the HTTP checker to support non blocking read
+ while processing stream. NONBLOCK flags is set before
+ read operation to catch EAGAIN error.
+ * VRRP : Diego Rivera, <lrivera@racsa.co.cr> and I fixed a
+ notify issue while building notify exec string.
+ * VRRP : Diego Rivera, <lrivera@racsa.co.cr> and I extended
+ FSM to support BACKUP state notifiers and smtp_alert call
+ during VRRP initialization.
+ * Jan Vanhercke, <jan.vanhercke@c-cure.be> and I extended
+ scheduling timer computation to support micro-sec second
+ overlap. Extended the whole scheduling framework to support
+ this scheduling scheme while computing thread timers.
+ * Fixed scheduling framework to support child thread timers
+ while computing global scheduling timer.
+
2003-09-07 Alexandre Cassen <acassen@linux-vs.org>
* keepalived-1.1.2 released.
* Dominik Vogt, <dominik.vogt@gmx.de> and I extended checker
View
@@ -9,7 +9,8 @@ Keepalived implementation is based on an I/O multiplexer to handle a
strong multi-threading framework. All the events process use this I/O
multiplexer.
-Keepalived is free software. See the file COPYING for copying conditions.
+Keepalived is free software, Copyright (C) Alexandre Cassen.
+See the file COPYING for copying conditions.
OPENSSL TOOLKIT LICENCE EXCEPTION
View
@@ -1 +1 @@
-1.1.2
+1.1.3
@@ -39,8 +39,8 @@ global_defs { # Block identification
The configuration block looks like :
static_ipaddress { # block identification
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE>
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE>
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
...
}
@@ -127,13 +127,13 @@ vrrp_instance <STRING> { # VRRP instance declaration
auth_pass <STRING> # Password string
}
virtual_ipaddress { # VRRP IP addres block
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE>
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE>
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
...
}
virtual_ipaddress_excluded { # VRRP IP excluded from VRRP
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE> # packets
- <IP ADDRESS>/<MASK> dev <STRING> scope <SCOPE>
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE> # packets
+ <IP ADDRESS>/<MASK> brd <IP ADDRESS> dev <STRING> scope <SCOPE>
...
}
virtual_routes { # VRRP virtual routes
View
@@ -58,7 +58,8 @@ extern REQ *req;
*/
/* free allocated pieces */
-static void free_all(thread * thread)
+static void
+free_all(thread * thread)
{
SOCK *sock = THREAD_ARG(thread);
@@ -87,7 +88,7 @@ epilog(thread * thread)
/* Simple finalization function */
int
-finalize(thread *thread)
+finalize(thread * thread)
{
SOCK *sock = THREAD_ARG(thread);
unsigned char digest[16];
@@ -99,7 +100,7 @@ finalize(thread *thread)
printf("\n");
printf(HTML_MD5);
print_buffer(16, digest);
-
+
printf(HTML_MD5_FINAL);
}
printf("MD5SUM = ");
@@ -113,20 +114,22 @@ finalize(thread *thread)
}
/* Process incoming stream */
-int http_process_stream(SOCK *sock, int r)
+int
+http_process_stream(SOCK * sock, int r)
{
sock->size += r;
sock->total_size += r;
if (!sock->extracted) {
if (req->verbose)
printf(HTTP_HEADER_HEXA);
- if ((sock->extracted =
- extract_html(sock->buffer, sock->size))) {
+ if ((sock->extracted = extract_html(sock->buffer, sock->size))) {
if (req->verbose) {
- print_buffer(sock->extracted - sock->buffer, sock->buffer);
+ print_buffer(sock->extracted - sock->buffer,
+ sock->buffer);
printf(HTTP_HEADER_ASCII);
- for (r = 0; r < sock->extracted - sock->buffer; r++)
+ for (r = 0; r < sock->extracted - sock->buffer;
+ r++)
printf("%c", sock->buffer[r]);
printf("\n");
printf(HTML_HEADER_HEXA);
@@ -136,8 +139,7 @@ int http_process_stream(SOCK *sock, int r)
if (req->verbose)
print_buffer(r, sock->extracted);
memcpy(sock->buffer, sock->extracted, r);
- MD5_Update(&sock->context, sock->buffer,
- r);
+ MD5_Update(&sock->context, sock->buffer, r);
r = 0;
}
sock->size = r;
@@ -152,8 +154,7 @@ int http_process_stream(SOCK *sock, int r)
} else if (sock->size) {
if (req->verbose)
print_buffer(r, sock->buffer);
- MD5_Update(&sock->context, sock->buffer,
- sock->size);
+ MD5_Update(&sock->context, sock->buffer, sock->size);
sock->size = 0;
}
@@ -249,13 +250,11 @@ http_request_thread(thread * thread)
memset(str_request, 0, GET_BUFFER_LENGTH);
snprintf(str_request, GET_BUFFER_LENGTH, REQUEST_TEMPLATE,
- req->url,
- (req->vhost) ? req->vhost : inet_ntop2(req->addr_ip)
+ req->url, (req->vhost) ? req->vhost : inet_ntop2(req->addr_ip)
, ntohs(req->addr_port));
/* Send the GET request to remote Web server */
- DBG("Sending GET request [%s] on fd:%d\n",
- req->url, sock->fd);
+ DBG("Sending GET request [%s] on fd:%d\n", req->url, sock->fd);
if (req->ssl)
ret =
ssl_send_request(sock->ssl, str_request,
@@ -269,8 +268,8 @@ http_request_thread(thread * thread)
if (!ret) {
fprintf(stderr, "Cannot send get request to [%s:%d].\n",
- inet_ntop2(req->addr_ip)
- , ntohs(req->addr_port));
+ inet_ntop2(req->addr_ip)
+ , ntohs(req->addr_port));
return epilog(thread);
}
View
@@ -36,7 +36,7 @@
/* global defs */
#define GET_BUFFER_LENGTH 2048
#define MAX_BUFFER_LENGTH 4096
-#define HTTP_CNX_TIMEOUT 5
+#define HTTP_CNX_TIMEOUT (5 * TIMER_HZ)
#define PROTO_HTTP 0x01
#define PROTO_SSL 0x02
@@ -55,9 +55,9 @@
#define HTML_MD5_FINAL DELIM_BEGIN" HTML MD5 final resulting "DELIM_END
/* Define prototypes */
-extern int epilog(thread *thread);
-extern int finalize(thread *thread);
-extern int http_process_stream(SOCK *sock, int r);
+extern int epilog(thread * thread);
+extern int finalize(thread * thread);
+extern int http_process_stream(SOCK * sock, int r);
extern int http_request_thread(thread * thread);
#endif
View
@@ -115,15 +115,8 @@ tcp_socket_state(int fd, thread * thread, uint32_t addr_ip, uint16_t addr_port,
inet_ntop2(addr_ip), ntohs(addr_port));
timer_min = timer_sub_now(thread->sands);
-
- if (TIMER_SEC(timer_min) <= 0)
- thread_add_write(thread->master, func,
- THREAD_ARG(thread)
- , thread->u.fd, 0);
- else
- thread_add_write(thread->master, func,
- THREAD_ARG(thread)
- , thread->u.fd, TIMER_SEC(timer_min));
+ thread_add_write(thread->master, func, THREAD_ARG(thread)
+ , thread->u.fd, TIMER_LONG(timer_min));
return connect_in_progress;
}
@@ -133,7 +126,7 @@ tcp_socket_state(int fd, thread * thread, uint32_t addr_ip, uint16_t addr_port,
void
tcp_connection_state(int fd, enum connect_result status, thread * thread,
int (*func) (struct _thread *)
- , int timeout)
+ , long timeout)
{
switch (status) {
case connect_error:
@@ -145,7 +138,7 @@ tcp_connection_state(int fd, enum connect_result status, thread * thread,
fd, timeout);
break;
- /* Checking non-blocking connect, we wait until socket is writable */
+ /* Checking non-blocking connect, we wait until socket is writable */
case connect_in_progress:
thread_add_write(thread->master, func, THREAD_ARG(thread),
fd, timeout);
@@ -162,8 +155,9 @@ tcp_check_thread(thread * thread)
SOCK *sock = THREAD_ARG(thread);
int ret = 1;
- sock->status = tcp_socket_state(thread->u.fd, thread, req->addr_ip
- , req->addr_port, tcp_check_thread);
+ sock->status =
+ tcp_socket_state(thread->u.fd, thread, req->addr_ip, req->addr_port,
+ tcp_check_thread);
switch (sock->status) {
case connect_error:
DBG("Error connecting server [%s:%d].\n",
@@ -189,8 +183,7 @@ tcp_check_thread(thread * thread)
*/
sock->lock = 0;
thread_add_event(thread->master,
- http_request_thread,
- sock, 0);
+ http_request_thread, sock, 0);
} else {
DBG("Connection trouble to: [%s:%d].\n",
inet_ntop2(req->addr_ip),
View
@@ -46,18 +46,18 @@ enum connect_result {
/* Prototypes defs */
extern enum connect_result
-tcp_connect(int fd, uint32_t, uint16_t);
+ tcp_connect(int fd, uint32_t, uint16_t);
extern enum connect_result
-tcp_socket_state(int, thread *, uint32_t, uint16_t,
- int (*func) (struct _thread *));
+ tcp_socket_state(int, thread *, uint32_t, uint16_t,
+ int (*func) (struct _thread *));
extern void
-tcp_connection_state(int, enum connect_result
- , thread *, int (*func) (struct _thread *)
- , int);
+ tcp_connection_state(int, enum connect_result
+ , thread *, int (*func) (struct _thread *)
+ , long);
extern int
-tcp_connect_thread(thread *);
+ tcp_connect_thread(thread *);
#endif
View
@@ -54,13 +54,13 @@ signal_set(int signo, void (*func) (int))
sig.sa_flags = 0;
#ifdef SA_RESTART
sig.sa_flags |= SA_RESTART;
-#endif /* SA_RESTART */
+#endif /* SA_RESTART */
ret = sigaction(signo, &sig, &osig);
if (ret < 0)
return (SIG_ERR);
- else
+ else
return (osig.sa_handler);
}
@@ -74,7 +74,6 @@ signal_init(void)
signal_set(SIGKILL, sigend);
}
-
/* Usage function */
static void
usage(const char *prog)
@@ -220,7 +219,7 @@ main(int argc, char **argv)
/* Signal handling initialization */
signal_init();
-
+
/* Create the master thread */
master = thread_make_master();
@@ -238,7 +237,7 @@ main(int argc, char **argv)
/* Finalize output informations */
if (req->verbose)
printf("Global response time for [%s] =%lu\n",
- req->url, req->response_time-req->ref_time);
+ req->url, req->response_time - req->ref_time);
/* exit cleanly */
SSL_CTX_free(req->ctx);
View
@@ -71,7 +71,7 @@ typedef struct {
} REQ;
/* Global variables */
-REQ *req; /* Cmd line arguments */
+REQ *req; /* Cmd line arguments */
unsigned int debug;
/* Data buffer length description */
View
@@ -36,7 +36,8 @@ extern thread_master *master;
extern SOCK *sock;
/* Close the descriptor */
-static void close_sock(SOCK *sock)
+static void
+close_sock(SOCK * sock)
{
if (sock->ssl) {
SSL_shutdown(sock->ssl);
@@ -46,7 +47,8 @@ static void close_sock(SOCK *sock)
}
/* Destroy the socket handler */
-void free_sock(SOCK *sock)
+void
+free_sock(SOCK * sock)
{
DBG("Freeing fd:%d\n", sock->fd);
@@ -55,10 +57,10 @@ void free_sock(SOCK *sock)
}
/* Init socket handler */
-void init_sock(void)
+void
+init_sock(void)
{
- sock = (SOCK *)MALLOC(sizeof(SOCK));
- memset(sock, 0, sizeof(SOCK));
- thread_add_event(master, tcp_connect_thread,
- sock, 0);
+ sock = (SOCK *) MALLOC(sizeof (SOCK));
+ memset(sock, 0, sizeof (SOCK));
+ thread_add_event(master, tcp_connect_thread, sock, 0);
}
View
@@ -44,7 +44,7 @@ typedef struct {
} SOCK;
/* Prototypes */
-extern void free_sock(SOCK *sock);
+extern void free_sock(SOCK * sock);
extern void init_sock(void);
#endif
View
@@ -106,8 +106,7 @@ ssl_connect(thread * thread)
SSL_set_bio(sock->ssl, sock->bio, sock->bio);
ret = SSL_connect(sock->ssl);
- DBG(" SSL_connect return code = %d on fd:%d\n",
- ret, thread->u.fd);
+ DBG(" SSL_connect return code = %d on fd:%d\n", ret, thread->u.fd);
ssl_printerr(SSL_get_error(sock->ssl, ret));
return (ret > 0) ? 1 : 0;
@@ -161,7 +160,7 @@ ssl_read_thread(thread * thread)
* and sometime not...
*/
-read_stream:
+ read_stream:
/* read the SSL stream */
memset(sock->buffer, 0, MAX_BUFFER_LENGTH);
Oops, something went wrong.

0 comments on commit c2f69b0

Please sign in to comment.