From 76d47df4fb2687a5e7edfa7db70247cc7555489f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pereira?= Date: Wed, 11 Sep 2024 17:53:07 +0200 Subject: [PATCH] fix 4282 --- router/dataplane.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/router/dataplane.go b/router/dataplane.go index 36b7146c5f..1701fcc8ab 100644 --- a/router/dataplane.go +++ b/router/dataplane.go @@ -405,6 +405,11 @@ func (d *DataPlane) AddNeighborIA(ifID uint16, remote addr.IA) error { // the given ID is already set, this method will return an error. This can only // be called on a not yet running dataplane. func (d *DataPlane) AddLinkType(ifID uint16, linkTo topology.LinkType) error { + d.mtx.Lock() + defer d.mtx.Unlock() + if d.IsRunning() { + return modifyExisting + } if _, exists := d.linkTypes[ifID]; exists { return serrors.JoinNoStack(alreadySet, nil, "ifID", ifID) }