From d3eb15f566f4d4efa0d1f2b2e85af7262ee8bd0c Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Mon, 26 Sep 2022 13:55:08 -0400 Subject: [PATCH 1/2] eliminate extra ; when creating ingress followed by egress --- logic/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logic/gateway.go b/logic/gateway.go index 2837b24c..250a3716 100644 --- a/logic/gateway.go +++ b/logic/gateway.go @@ -87,12 +87,12 @@ func CreateEgressGateway(gateway models.EgressGatewayRequest) (models.Node, erro } if node.PostUp != "" { if !strings.Contains(node.PostUp, postUpCmd) { - postUpCmd = node.PostUp + " ; " + postUpCmd + postUpCmd = node.PostUp + postUpCmd } } if node.PostDown != "" { if !strings.Contains(node.PostDown, postDownCmd) { - postDownCmd = node.PostDown + " ; " + postDownCmd + postDownCmd = node.PostDown + postDownCmd } } From 24f78b172ee41f06e1f323d999ea37a9014482d6 Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Mon, 26 Sep 2022 13:55:08 -0400 Subject: [PATCH 2/2] eliminate extra ; when creating ingress followed by egress --- logic/gateway.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logic/gateway.go b/logic/gateway.go index 2837b24c..250a3716 100644 --- a/logic/gateway.go +++ b/logic/gateway.go @@ -87,12 +87,12 @@ func CreateEgressGateway(gateway models.EgressGatewayRequest) (models.Node, erro } if node.PostUp != "" { if !strings.Contains(node.PostUp, postUpCmd) { - postUpCmd = node.PostUp + " ; " + postUpCmd + postUpCmd = node.PostUp + postUpCmd } } if node.PostDown != "" { if !strings.Contains(node.PostDown, postDownCmd) { - postDownCmd = node.PostDown + " ; " + postDownCmd + postDownCmd = node.PostDown + postDownCmd } }