diff options
author | Stef Walter <stef@thewalter.net> | 2010-11-01 22:32:50 -0600 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2011-01-23 15:47:45 -0600 |
commit | e9dbde9343295998205360b86965bbda5c0700ba (patch) | |
tree | 1a7efbec9cef61efe9987e68e1071698c2bcb561 /common/smtppass.c | |
parent | 64183ac418dd2e3e13fca69c3294d3a25ba2700e (diff) |
Enable IP_TRANSPARENT on the main socket as well.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r-- | common/smtppass.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 7b668b6..d9b8cb5 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -333,6 +333,15 @@ int sp_run(const char* configfile, const char* pidfile, int dbg_level) if(SANY_TYPE(g_state.listenaddr) == AF_UNIX) unlink(g_state.listenname); +#ifdef HAVE_IP_TRANSPARENT + if(g_state.transparent) + { + int value = 1; + if(setsockopt(sock, SOL_IP, IP_TRANSPARENT, &value, sizeof(value)) < 0) + sp_message(NULL, LOG_WARNING, "couldn't set transparent mode on socket"); + } +#endif + if(bind(sock, &SANY_ADDR(g_state.listenaddr), SANY_LEN(g_state.listenaddr)) != 0) { sp_message(NULL, LOG_CRIT, "couldn't bind to address: %s", g_state.listenname); |