Re: Couple of issues with SMTP_CHECK
jan <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I think best way is to studies smtp/ssl checker and reuse some code from
that, it will give
SSL and working connection option in layer4.
Replace code chains url/md5 with current implementation of check_smtp
chains/states.
Can't find any code in smtp check for parse port settings,
only one call to checker_set_dst_port(&new->dst,
htons(SMTP_DEFAULT_PORT));
With default port settings to 25 , also missing SSL support for mail
server in current code.
layer4 settings to handle port, timeouts should be handled in same way
for all checkers.
macro for handle connect options is not working in current
implementation for smtp check
code like:
#define CHECKER_GET_CO()
#define CHECKER_NEW_CO()
defined in checker_api.h
I also think some work muse be done before it work as expected in config
syntax.
it discard any port from config file settings in current version:
real_server <ipaddr> <port> {
....
}
2015-03-26 16:16 skrev Chris Adams:
> Once upon a time, Chris Adams <[email protected]> said:
>> For comparison, I tried to have keepalived load the sample SMTP_CHECK
>> config file, and it also failed (so it isn't just my config):
>
> I fired up 1.2.13 in the debugger, and I see what is happening. When
> the config parser gets to parsing the host{} block, there isn't a
> checker connect options structure allocated:
>
> (gdb) where
> #0 0x0000000000433e89 in inet_stosockaddr (ip=0xb4b2a0 "172.16.1.11",
> port=0x0, addr=0x0) at utils.c:168
> #1 0x000000000040c9cf in co_ip_handler (strvec=0xb4b260) at
> check_api.c:138
> #2 0x000000000043cc08 in process_stream (keywords_vec=0xb47ed0)
> at parser.c:437
> ...
>
> When I look at co_ip_handler(), co is NULL.
>
> I get the same behavior from 1.2.15 reading the sample config. Is
> there
> some ordering or something that allows a host{} block in an SMTP_CHECK
> to actually load?
--
mvh
/Jan Holmberg
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/