]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Received parser fix.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2013 15:32:30 +0000 (16:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 24 Jun 2013 15:32:30 +0000 (16:32 +0100)
src/message.c

index 9e7eecfa20af20e329e44906967a67712541aa5f..654331a70f69509a28ba71c32adceea816ee133d 100644 (file)
@@ -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;