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
4e8debf8
Commit
4e8debf8
authored
Apr 28, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: old switcheroo for eventual php module removal
Only one function left. :)
parent
2533e110
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
interfaces.inc
src/etc/inc/interfaces.inc
+13
-15
legacy.inc
src/etc/inc/xmlrpc/legacy.inc
+1
-1
No files found.
src/etc/inc/interfaces.inc
View file @
4e8debf8
...
...
@@ -2914,22 +2914,20 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
if
(
!
file_exists
(
"/var/run/booting"
)
&&
!
(
substr
(
$realif
,
0
,
4
)
==
"ovpn"
))
{
/* remove all IPv4 and IPv6 addresses */
$tmpifaces
=
pfSense_getall_interface_addresses
(
$realif
);
if
(
is_array
(
$tmpifaces
))
{
foreach
(
$tmpifaces
as
$tmpiface
)
{
if
(
is_ipaddrv6
(
$tmpiface
)
||
is_subnetv6
(
$tmpiface
))
{
if
(
!
is_linklocal
(
$tmpiface
))
{
mwexec
(
"/sbin/ifconfig "
.
escapeshellarg
(
$realif
)
.
" inet6
{
$tmpiface
}
delete"
);
}
$tmpifaces
=
legacy_getall_interface_addresses
(
$realif
);
foreach
(
$tmpifaces
as
$tmpiface
)
{
if
(
is_ipaddrv6
(
$tmpiface
)
||
is_subnetv6
(
$tmpiface
))
{
if
(
!
is_linklocal
(
$tmpiface
))
{
mwexec
(
"/sbin/ifconfig "
.
escapeshellarg
(
$realif
)
.
" inet6
{
$tmpiface
}
delete"
);
}
}
else
{
if
(
is_subnetv4
(
$tmpiface
))
{
$tmpip
=
explode
(
'/'
,
$tmpiface
);
$tmpip
=
$tmpip
[
0
];
}
else
{
if
(
is_subnetv4
(
$tmpiface
))
{
$tmpip
=
explode
(
'/'
,
$tmpiface
);
$tmpip
=
$tmpip
[
0
];
}
else
{
$tmpip
=
$tmpiface
;
}
legacy_interface_deladdress
(
$realif
,
$tmpip
);
$tmpip
=
$tmpiface
;
}
legacy_interface_deladdress
(
$realif
,
$tmpip
);
}
}
...
...
@@ -4674,7 +4672,7 @@ function find_interface_ipv6_ll($interface)
{
$interface
=
trim
(
$interface
);
if
(
does_interface_exist
(
$interface
))
{
$ifinfo
=
pfSense
_getall_interface_addresses
(
$interface
);
$ifinfo
=
legacy
_getall_interface_addresses
(
$interface
);
foreach
(
$ifinfo
as
$line
)
{
if
(
strstr
(
$line
,
":"
))
{
$parts
=
explode
(
"/"
,
$line
);
...
...
src/etc/inc/xmlrpc/legacy.inc
View file @
4e8debf8
...
...
@@ -64,7 +64,7 @@ function does_vip_exist($vip) {
return
false
;
}
$ifacedata
=
pfSense
_getall_interface_addresses
(
$realif
);
$ifacedata
=
legacy
_getall_interface_addresses
(
$realif
);
foreach
(
$ifacedata
as
$vipips
)
{
if
(
$vipips
==
"
{
$vip
[
'subnet'
]
}
/
{
$vip
[
'subnet_bits'
]
}
"
)
{
return
true
;
...
...
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