From c4eb2c351e0bb5e15b1a24cb88abbf07e3711cc5 Mon Sep 17 00:00:00 2001 From: Matt Primrose Date: Thu, 17 Oct 2024 15:29:29 -0700 Subject: [PATCH] fix: update ieee8021x config struct to be a pointer --- pkg/config/v2.go | 32 ++++++++++++++++---------------- pkg/security/decrypt_test.go | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkg/config/v2.go b/pkg/config/v2.go index 9e67798e..2f51fafa 100644 --- a/pkg/config/v2.go +++ b/pkg/config/v2.go @@ -31,16 +31,16 @@ type Network struct { } type Wired struct { - DHCPEnabled bool `yaml:"dhcpEnabled"` - IPSyncEnabled bool `yaml:"ipSyncEnabled"` - SharedStaticIP bool `yaml:"sharedStaticIP"` - IPAddress string `yaml:"ipAddress"` - SubnetMask string `yaml:"subnetMask"` - DefaultGateway string `yaml:"defaultGateway"` - PrimaryDNS string `yaml:"primaryDNS"` - SecondaryDNS string `yaml:"secondaryDNS"` - Authentication string `yaml:"authentication"` - IEEE8021x IEEE8021x `yaml:"ieee8021x"` + DHCPEnabled bool `yaml:"dhcpEnabled"` + IPSyncEnabled bool `yaml:"ipSyncEnabled"` + SharedStaticIP bool `yaml:"sharedStaticIP"` + IPAddress string `yaml:"ipAddress"` + SubnetMask string `yaml:"subnetMask"` + DefaultGateway string `yaml:"defaultGateway"` + PrimaryDNS string `yaml:"primaryDNS"` + SecondaryDNS string `yaml:"secondaryDNS"` + Authentication string `yaml:"authentication"` + IEEE8021x *IEEE8021x `yaml:"ieee8021x"` } type Wireless struct { @@ -48,12 +48,12 @@ type Wireless struct { } type WirelessProfile struct { - SSID string `yaml:"ssid"` - Password string `yaml:"password"` - AuthenticationMethod string `yaml:"authenticationMethod"` - EncryptionMethod string `yaml:"encryptionMethod"` - Priority int `yaml:"priority"` - IEEE8021x IEEE8021x `yaml:"ieee8021x"` + SSID string `yaml:"ssid"` + Password string `yaml:"password"` + AuthenticationMethod string `yaml:"authenticationMethod"` + EncryptionMethod string `yaml:"encryptionMethod"` + Priority int `yaml:"priority"` + IEEE8021x *IEEE8021x `yaml:"ieee8021x"` } type IEEE8021x struct { diff --git a/pkg/security/decrypt_test.go b/pkg/security/decrypt_test.go index f20ee7b3..0affc72b 100644 --- a/pkg/security/decrypt_test.go +++ b/pkg/security/decrypt_test.go @@ -50,7 +50,7 @@ var ( AuthenticationMethod: "WPA3 SAE", EncryptionMethod: "CCMP", Priority: 1, - IEEE8021x: config.IEEE8021x{ + IEEE8021x: &config.IEEE8021x{ AuthenticationProtocol: 0, Username: "", Password: "",