@@ -156,7 +156,7 @@ func (d *Interfaces) readConfig(ctx context.Context, MyDB *sql.DB) {
156156 }
157157
158158 // IP per role
159- if ConfNet .SplitNetwork == "enabled" {
159+ if sharedutils . IsEnabled ( ConfNet .SplitNetwork ) {
160160 var keyConfRoles pfconfigdriver.PfconfigKeys
161161 keyConfRoles .PfconfigNS = "config::Roles"
162162
@@ -284,7 +284,7 @@ func (d *Interfaces) readConfig(ctx context.Context, MyDB *sql.DB) {
284284 options [dhcp .OptionDomainNameServer ] = []byte (DHCPScope .ip .To4 ())
285285 options [dhcp .OptionRouter ] = []byte (DHCPScope .ip .To4 ())
286286 options [dhcp .OptionDomainName ] = []byte (ConfNet .DomainName )
287- if portal .SecureRedirect == "enabled" {
287+ if sharedutils . IsEnabled ( portal .SecureRedirect ) {
288288 options [dhcp .OptionCaptivePortal ] = []byte (detectPortalURL (ConfNet , general ))
289289 }
290290 DHCPScope .options = options
@@ -365,7 +365,7 @@ func (d *Interfaces) readConfig(ctx context.Context, MyDB *sql.DB) {
365365 options [dhcp .OptionDomainNameServer ] = ShuffleDNS (ctx , ConfNet )
366366 options [dhcp .OptionRouter ] = ShuffleGateway (ctx , ConfNet )
367367 options [dhcp .OptionDomainName ] = []byte (ConfNet .DomainName )
368- if portal .SecureRedirect == "enabled" {
368+ if sharedutils . IsEnabled ( portal .SecureRedirect ) {
369369 options [dhcp .OptionCaptivePortal ] = []byte (detectPortalURL (ConfNet , general ))
370370 }
371371 DHCPScope .options = options
0 commit comments