From 2a29679e9d0676e8183f601915e0dbbb04c608a6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 10 May 2018 22:38:13 -0700 Subject: [PATCH] agent/consul: forward request if necessary --- agent/consul/intention_endpoint.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent/consul/intention_endpoint.go b/agent/consul/intention_endpoint.go index 2bae56f5ea..3785652414 100644 --- a/agent/consul/intention_endpoint.go +++ b/agent/consul/intention_endpoint.go @@ -263,6 +263,11 @@ func (s *Intention) Match( func (s *Intention) Test( args *structs.IntentionQueryRequest, reply *structs.IntentionQueryTestResponse) error { + // Forward maybe + if done, err := s.srv.forward("Intention.Test", args, args, reply); done { + return err + } + // Get the test args, and defensively guard against nil query := args.Test if query == nil {