aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-07 13:33:45 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-07 13:33:45 +0000
commitcd5656abb755d5070651b1594bc4b2f8acd345df (patch)
tree8856926125af323e2722f67ba15f1c53037078fb /src/libutil/upstream.h
parent9691ba214d38cda7042ba902acd3c6e7231aa6b7 (diff)
downloadrspamd-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.h8
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