From 71d0bb8ce2162a21c9c2dc13bb4ea9da1e442f2b Mon Sep 17 00:00:00 2001 From: Timofey Klimov Date: Tue, 14 Jan 2025 11:46:49 +0300 Subject: [PATCH 1/2] Add patch for default eupf cmd config [issue #587] Details: https://github.com/edgecomllc/eupf/issues/587 --- cmd/config/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/config/config.go b/cmd/config/config.go index 72c2d1f3..d3dc1f43 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -119,6 +119,10 @@ func init() { v.SetDefault("ueip_pool", "10.60.0.0/24") v.SetDefault("teid_pool", 65535) + if v.GetString("n9_address") == "n3addr" { + v.Set("n9_address", v.GetString("n3_address")) + } + v.SetConfigFile(*configPath) v.SetEnvPrefix("upf") @@ -150,10 +154,6 @@ func (c *UpfConfig) Validate() error { c.UEIPPool = "" } - if c.N9Address == "n3addr" { - c.N9Address = c.N3Address - } - return nil } From 81086ef58d392ba72912b91e936290d03057e68f Mon Sep 17 00:00:00 2001 From: Timofey Klimov Date: Thu, 16 Jan 2025 14:08:30 +0300 Subject: [PATCH 2/2] Add patch for default eupf cmd config --- .gitignore | 5 ++++- cmd/config/config.go | 28 +--------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index a19a41d7..18a0b5a6 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ cmd/docs # Generated by Robot Framework log.html output.xml -report.html \ No newline at end of file +report.html + +# Other +.DS_Store \ No newline at end of file diff --git a/cmd/config/config.go b/cmd/config/config.go index d3dc1f43..70c402cd 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -95,33 +95,7 @@ func init() { _ = v.BindPFlag("ueip_pool", pflag.Lookup("ueippool")) _ = v.BindPFlag("teid_pool", pflag.Lookup("teidpool")) - v.SetDefault("interface_name", "lo") - v.SetDefault("xdp_attach_mode", "generic") - v.SetDefault("api_address", ":8080") - v.SetDefault("pfcp_address", "127.0.0.1:8805") - v.SetDefault("pfcp_node_id", "127.0.0.1") - v.SetDefault("association_setup_timeout", 5) - v.SetDefault("metrics_address", ":9090") - v.SetDefault("n3_address", "127.0.0.1") - v.SetDefault("n9_address", "n3addr") - v.SetDefault("gtp_echo_interval", 10) - v.SetDefault("qer_map_size", 1024) - v.SetDefault("far_map_size", 1024) - v.SetDefault("urr_map_size", 1024) - v.SetDefault("pdr_map_size", 1024) - v.SetDefault("resize_ebpf_maps", false) - v.SetDefault("heartbeat_retries", 3) - v.SetDefault("heartbeat_interval", 5) - v.SetDefault("heartbeat_timeout", 5) - v.SetDefault("logging_level", "info") - v.SetDefault("feature_ueip", false) - v.SetDefault("feature_ftup", false) - v.SetDefault("ueip_pool", "10.60.0.0/24") - v.SetDefault("teid_pool", 65535) - - if v.GetString("n9_address") == "n3addr" { - v.Set("n9_address", v.GetString("n3_address")) - } + v.SetDefault("n9_address", v.GetString("n3_address")) v.SetConfigFile(*configPath)