diff --git a/src/cfgparse.c b/src/cfgparse.c
index a560521..0edfad0 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -566,12 +566,13 @@
 #endif
 
 /* Allocate and initialize the frontend of a "peers" section found in
- * file <file> at line <linenum> for section <peers>.
+ * file <file> at line <linenum> with <id> as ID.
  * Return 0 if succeeded, -1 if not.
  * Note that this function may be called from "default-server"
  * or "peer" lines.
  */
-static int init_peers_frontend(const char *file, int linenum, struct peers *peers)
+static int init_peers_frontend(const char *file, int linenum,
+                               const char *id, struct peers *peers)
 {
 	struct proxy *p;
 
@@ -593,9 +594,8 @@
 	peers->peers_fe = p;
 
  out:
-	if (!p->id && peers->id)
-		p->id = strdup(peers->id);
-
+	if (id && !p->id)
+		p->id = strdup(id);
 	free(p->conf.file);
 	p->conf.args.file = p->conf.file = strdup(file);
 	if (linenum != -1)
@@ -697,7 +697,7 @@
 
 		cur_arg = 1;
 
-		if (init_peers_frontend(file, linenum, curpeers) != 0) {
+		if (init_peers_frontend(file, linenum, NULL, curpeers) != 0) {
 			err_code |= ERR_ALERT | ERR_ABORT;
 			goto out;
 		}
@@ -771,7 +771,7 @@
 			goto out;
 	}
 	else if (strcmp(args[0], "default-server") == 0) {
-		if (init_peers_frontend(file, -1, curpeers) != 0) {
+		if (init_peers_frontend(file, -1, NULL, curpeers) != 0) {
 			err_code |= ERR_ALERT | ERR_ABORT;
 			goto out;
 		}
@@ -779,7 +779,7 @@
 		                         SRV_PARSE_DEFAULT_SERVER|SRV_PARSE_IN_PEER_SECTION|SRV_PARSE_INITIAL_RESOLVE);
 	}
 	else if (strcmp(args[0], "log") == 0) {
-		if (init_peers_frontend(file, linenum, curpeers) != 0) {
+		if (init_peers_frontend(file, linenum, NULL, curpeers) != 0) {
 			err_code |= ERR_ALERT | ERR_ABORT;
 			goto out;
 		}
@@ -876,6 +876,7 @@
 		/* Line number and peer ID are updated only if this peer is the local one. */
 		if (init_peers_frontend(file,
 		                        newpeer->local ? linenum: -1,
+		                        newpeer->local ? newpeer->id : NULL,
 		                        curpeers) != 0) {
 			err_code |= ERR_ALERT | ERR_ABORT;
 			goto out;
@@ -968,7 +969,7 @@
 		size_t prefix_len;
 
 		/* Line number and peer ID are updated only if this peer is the local one. */
-		if (init_peers_frontend(file, -1, curpeers) != 0) {
+		if (init_peers_frontend(file, -1, NULL, curpeers) != 0) {
 			err_code |= ERR_ALERT | ERR_ABORT;
 			goto out;
 		}
