From: Vsevolod Stakhov Date: Mon, 24 Jun 2013 15:32:30 +0000 (+0100) Subject: Received parser fix. X-Git-Tag: 0.6.0~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee897f54b24371d7132621de4ef80e5749b4e5fc;p=thirdparty%2Frspamd.git Received parser fix. --- diff --git a/src/message.c b/src/message.c index 9e7eecfa20..654331a70f 100644 --- a/src/message.c +++ b/src/message.c @@ -393,7 +393,7 @@ parse_recv_header (memory_pool_t * pool, gchar *line, struct received_header *r) s = ++p; state = RSPAMD_RECV_STATE_PARSE_IP; res = &r->real_ip; - next_state = RSPAMD_RECV_STATE_IP_BLOCK; + next_state = RSPAMD_RECV_STATE_BRACES_BLOCK; } else { if (p > s) { @@ -497,7 +497,7 @@ parse_recv_header (memory_pool_t * pool, gchar *line, struct received_header *r) while (g_ascii_isdigit (*++p) || *p == '.' || *p == ':'); if (*p != ']') { /* Not an ip in fact */ - state = next_state; + state = RSPAMD_RECV_STATE_SKIP_SPACES; p++; } else { @@ -505,7 +505,7 @@ parse_recv_header (memory_pool_t * pool, gchar *line, struct received_header *r) *res = memory_pool_strdup (pool, s); *p = ']'; p++; - state = next_state; + state = RSPAMD_RECV_STATE_SKIP_SPACES; } break;