From 3de880a10ae54de2bdcfb62ef9faa72924a04357 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 20 May 2021 10:06:20 +0000 Subject: [PATCH] Properly initalize the MRT config so that mrt_reconfigure() is doing the right thing. This also fixes the bgpd -nv output for 'dump X {in,out}' statements for peers. Debugged with and tested by Paul de Weerd --- usr.sbin/bgpd/parse.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index c5d987a5ec1..df91c68f8bc 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.415 2021/04/15 13:42:33 bluhm Exp $ */ +/* $OpenBSD: parse.y,v 1.416 2021/05/20 10:06:20 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -3998,6 +3998,7 @@ add_mrtconfig(enum mrt_type type, char *name, int timeout, struct peer *p, fatal("add_mrtconfig"); n->type = type; + n->state = MRT_STATE_OPEN; if (strlcpy(MRT2MC(n)->name, name, sizeof(MRT2MC(n)->name)) >= sizeof(MRT2MC(n)->name)) { yyerror("filename \"%s\" too long: max %zu", @@ -4012,7 +4013,7 @@ add_mrtconfig(enum mrt_type type, char *name, int timeout, struct peer *p, n->group_id = p->conf.id; } else { n->peer_id = p->conf.id; - n->group_id = 0; + n->group_id = p->conf.groupid; } } if (rib) { -- 2.20.1