From 83594862bfccad9f16d02f89c7f9e825c2209343 Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Tue, 6 Dec 2022 02:00:50 +0400 Subject: [PATCH] e2e: modify GTPU proxy test to verify a session w/o PFCP_CLASSIFY --- test/e2e/framework/sessionconfig.go | 5 +++-- test/e2e/upg_e2e.go | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/sessionconfig.go b/test/e2e/framework/sessionconfig.go index cb9c1d4..9a610bc 100644 --- a/test/e2e/framework/sessionconfig.go +++ b/test/e2e/framework/sessionconfig.go @@ -51,6 +51,7 @@ type SessionConfig struct { NatPoolName string IMSI string IPFIXTemplate string + SkipSDFFilter bool } const ( @@ -232,7 +233,7 @@ func (cfg SessionConfig) forwardPDR(pdrID uint16, farID, urrID, precedence uint3 panic("bad UPGMode") } - if appID == "" { + if appID == "" && !cfg.SkipSDFFilter { if sdfFilter == "" { sdfFilter = "permit out ip from any to assigned" } @@ -274,7 +275,7 @@ func (cfg SessionConfig) reversePDR(pdrID uint16, farID, urrID, precedence uint3 ie.NewSourceInterface(ie.SrcInterfaceCore)) } - if appID == "" { + if appID == "" && !cfg.SkipSDFFilter { if sdfFilter == "" { sdfFilter = "permit out ip from any to assigned" } diff --git a/test/e2e/upg_e2e.go b/test/e2e/upg_e2e.go index d2a6a62..8ed9370 100644 --- a/test/e2e/upg_e2e.go +++ b/test/e2e/upg_e2e.go @@ -1642,6 +1642,9 @@ func describeGTPProxy(title string, ipMode framework.UPGIPMode) { ProxyCoreTEID: framework.ProxyCoreTEID, ProxyAccessIP: f.VPPCfg.GetVPPAddress("access").IP, ProxyCoreIP: f.VPPCfg.GetVPPAddress("core").IP, + // Make sure PFCP_CLASSIFY is not set for the session. + // That's an important edge case + SkipSDFFilter: true, } var err error seid, err = f.PFCP.EstablishSession(f.Context, 0, cfg.SessionIEs()...)