diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-07 13:33:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-07 13:33:45 +0000 |
commit | cd5656abb755d5070651b1594bc4b2f8acd345df (patch) | |
tree | 8856926125af323e2722f67ba15f1c53037078fb /src/libutil/upstream.h | |
parent | 9691ba214d38cda7042ba902acd3c6e7231aa6b7 (diff) | |
download | rspamd-cd5656abb755d5070651b1594bc4b2f8acd345df.tar.gz rspamd-cd5656abb755d5070651b1594bc4b2f8acd345df.zip |
Rework IP addresses in upstreams.
- Select ipv4/unix addresses if they exist and use ipv6 for ipv6 only
upstreams (since the support of ipv6 is poor in many OSes and
environments).
- Free IP list on upstream destruction.
- Add test cases for addresses selection.
- Allow adding of free form IP addresses to upstreams.
Diffstat (limited to 'src/libutil/upstream.h')
-rw-r--r-- | src/libutil/upstream.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/upstream.h b/src/libutil/upstream.h index 812cc4bd8..cff6acfb1 100644 --- a/src/libutil/upstream.h +++ b/src/libutil/upstream.h @@ -117,6 +117,14 @@ gboolean rspamd_upstreams_from_ucl (struct upstream_list *ups, rspamd_inet_addr_t* rspamd_upstream_addr (struct upstream *up); /** + * Add custom address for an upstream + * @param up + * @return + */ +gboolean rspamd_upstream_add_addr (struct upstream *up, + const rspamd_inet_addr_t *addr); + +/** * Returns the symbolic name of the upstream * @param up * @return |