Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
678aa412
Commit
678aa412
authored
Jul 21, 2017
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more config handling fixes in inc directory, for
https://github.com/opnsense/core/issues/1733
parent
f0e2126f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
gwlb.inc
src/etc/inc/gwlb.inc
+2
-2
interfaces.inc
src/etc/inc/interfaces.inc
+3
-3
plugins.inc
src/etc/inc/plugins.inc
+2
-2
webgui.inc
src/etc/inc/plugins.inc.d/webgui.inc
+2
-2
services.inc
src/etc/inc/services.inc
+2
-2
util.inc
src/etc/inc/util.inc
+3
-3
No files found.
src/etc/inc/gwlb.inc
View file @
678aa412
...
...
@@ -482,7 +482,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
continue
;
}
$ifcfg
=
&
$config
[
'interfaces'
][
$ifname
]
;
$ifcfg
=
&
config_read_array
(
'interfaces'
,
$ifname
)
;
if
(
!
empty
(
$ifcfg
[
'ipaddr'
])
&&
is_ipaddrv4
(
$ifcfg
[
'ipaddr'
]))
{
continue
;
...
...
@@ -557,7 +557,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive
continue
;
}
$ifcfg
=
&
$config
[
'interfaces'
][
$ifname
]
;
$ifcfg
=
&
config_read_array
(
'interfaces'
,
$ifname
)
;
if
(
!
empty
(
$ifcfg
[
'ipaddrv6'
])
&&
is_ipaddrv6
(
$ifcfg
[
'ipaddrv6'
]))
{
continue
;
...
...
src/etc/inc/interfaces.inc
View file @
678aa412
...
...
@@ -3912,7 +3912,7 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface =
break
;
}
$cfg
=
&
$config
[
'interfaces'
][
$interface
]
;
$cfg
=
&
config_read_array
(
'interfaces'
,
$interface
)
;
if
(
$family
==
"inet6"
)
{
if
(
isset
(
$cfg
[
'ipaddrv6'
]))
{
...
...
@@ -4367,7 +4367,7 @@ function interface_has_gateway($friendly)
global
$config
;
if
(
!
empty
(
$config
[
'interfaces'
][
$friendly
]))
{
$ifname
=
&
$config
[
'interfaces'
][
$friendly
]
;
$ifname
=
&
config_read_array
(
'interfaces'
,
$friendly
)
;
switch
(
$ifname
[
'ipaddr'
])
{
case
"dhcp"
:
case
"pppoe"
:
...
...
@@ -4400,7 +4400,7 @@ function interface_has_gatewayv6($friendly)
global
$config
;
if
(
!
empty
(
$config
[
'interfaces'
][
$friendly
]))
{
$ifname
=
&
$config
[
'interfaces'
][
$friendly
]
;
$ifname
=
&
config_read_array
(
'interfaces'
,
$friendly
)
;
if
(
isset
(
$ifname
[
'ipaddrv6'
]))
{
$ipaddrv6
=
$ifname
[
'ipaddrv6'
];
}
else
{
...
...
src/etc/inc/plugins.inc
View file @
678aa412
...
...
@@ -153,9 +153,9 @@ function plugins_interfaces()
}
if
(
isset
(
$config
[
'interfaces'
][
$intf_ref
][
0
]))
{
// undo stupid listags() turning our item into a new array, see src/etc/inc/xmlparse.inc
$intf_config
=
&
$config
[
'interfaces'
][
$intf_ref
][
0
]
;
$intf_config
=
&
config_read_array
(
'interfaces'
,
$intf_ref
,
0
)
;
}
else
{
$intf_config
=
&
$config
[
'interfaces'
][
$intf_ref
]
;
$intf_config
=
&
config_read_array
(
'interfaces'
,
$intf_ref
)
;
}
$intf_config
[
'internal_dynamic'
]
=
true
;
// traverse and diff interface properties with known configuration
...
...
src/etc/inc/plugins.inc.d/webgui.inc
View file @
678aa412
...
...
@@ -64,11 +64,11 @@ function webgui_configure_do($verbose = false)
if
(
!
is_array
(
$config
[
'ca'
]))
{
$config
[
'ca'
]
=
array
();
}
$a_ca
=
&
$config
[
'ca'
]
;
$a_ca
=
&
config_read_array
(
'ca'
)
;
if
(
!
is_array
(
$config
[
'cert'
]))
{
$config
[
'cert'
]
=
array
();
}
$a_cert
=
&
$config
[
'cert'
]
;
$a_cert
=
&
config_read_array
(
'cert'
)
;
log_error
(
"Creating SSL certificate for this host"
);
$cert
=
array
();
$cert
[
'refid'
]
=
uniqid
();
...
...
src/etc/inc/services.inc
View file @
678aa412
...
...
@@ -1321,7 +1321,7 @@ function services_dhcrelay_configure($verbose = false)
killbypid
(
'/var/run/dhcrelay.pid'
,
'TERM'
,
true
);
$dhcrelaycfg
=
&
$config
[
'dhcrelay'
]
;
$dhcrelaycfg
=
&
config_read_array
(
'dhcrelay'
)
;
if
(
!
isset
(
$dhcrelaycfg
[
'enable'
]))
{
return
;
...
...
@@ -1440,7 +1440,7 @@ function services_dhcrelay6_configure($verbose = false)
killbypid
(
'/var/run/dhcrelay6.pid'
,
'TERM'
,
true
);
$dhcrelaycfg
=
&
$config
[
'dhcrelay6'
]
;
$dhcrelaycfg
=
&
config_read_array
(
'dhcrelay6'
)
;
if
(
!
isset
(
$dhcrelaycfg
[
'enable'
]))
{
return
;
...
...
src/etc/inc/util.inc
View file @
678aa412
...
...
@@ -696,7 +696,7 @@ function get_configured_carp_interface_list($carpinterface = '', $family = 'inet
$iflist
=
array
();
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
$viparr
=
&
$config
[
'virtualip'
][
'vip'
]
;
$viparr
=
&
config_read_array
(
'virtualip'
,
'vip'
)
;
foreach
(
$viparr
as
$vip
)
{
switch
(
$vip
[
'mode'
])
{
case
"carp"
:
...
...
@@ -727,7 +727,7 @@ function get_configured_ip_aliases_list($returnfullentry = false)
$alias_list
=
array
();
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
$viparr
=
&
$config
[
'virtualip'
][
'vip'
]
;
$viparr
=
&
config_read_array
(
'virtualip'
,
'vip'
)
;
foreach
(
$viparr
as
$vip
)
{
if
(
$vip
[
'mode'
]
==
"ipalias"
)
{
if
(
$returnfullentry
)
{
...
...
@@ -747,7 +747,7 @@ function get_configured_vips_list()
global
$config
;
$alias_list
=
array
();
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
$viparr
=
&
$config
[
'virtualip'
][
'vip'
]
;
$viparr
=
&
config_read_array
(
'virtualip'
,
'vip'
)
;
foreach
(
$viparr
as
$vip
)
{
if
(
$vip
[
'mode'
]
==
"carp"
)
{
$alias_list
[]
=
array
(
"ipaddr"
=>
$vip
[
'subnet'
],
"if"
=>
"
{
$vip
[
'interface'
]
}
_vip
{
$vip
[
'vhid'
]
}
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment