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
9b94d2f2
Commit
9b94d2f2
authored
Apr 28, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: port status-only probe
parent
c46d5ad0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
interfaces.inc
src/etc/inc/interfaces.inc
+8
-9
util.inc
src/etc/inc/util.inc
+2
-4
No files found.
src/etc/inc/interfaces.inc
View file @
9b94d2f2
...
@@ -2701,8 +2701,8 @@ EOD;
...
@@ -2701,8 +2701,8 @@ EOD;
/* find which clones are up and bring them down */
/* find which clones are up and bring them down */
$clones_up
=
array
();
$clones_up
=
array
();
foreach
(
$clone_list
as
$clone_if
)
{
foreach
(
$clone_list
as
$clone_if
)
{
$clone_status
=
pfSense_get_interface_addresse
s
(
$clone_if
);
$clone_status
=
legacy_interface_stat
s
(
$clone_if
);
if
(
$clone_status
[
'
status'
]
==
'up
'
)
{
if
(
$clone_status
[
'
link state'
]
==
'2
'
)
{
$clones_up
[]
=
$clone_if
;
$clones_up
[]
=
$clone_if
;
mwexec
(
"
{
$ifconfig
}
"
.
escapeshellarg
(
$clone_if
)
.
" down"
);
mwexec
(
"
{
$ifconfig
}
"
.
escapeshellarg
(
$clone_if
)
.
" down"
);
}
}
...
@@ -5097,20 +5097,19 @@ function get_interface_info($ifdescr)
...
@@ -5097,20 +5097,19 @@ function get_interface_info($ifdescr)
$chkif
=
$ifinfo
[
'if'
];
$chkif
=
$ifinfo
[
'if'
];
$ifinfotmp
=
pfSense_get_interface_addresses
(
$chkif
);
$ifinfotmp
=
pfSense_get_interface_addresses
(
$chkif
);
$ifinfo
[
'status'
]
=
$ifinfotmp
[
'status'
];
if
(
empty
(
$ifinfo
[
'status'
]))
{
$ifinfo
[
'status'
]
=
'down'
;
}
$ifinfo
[
'macaddr'
]
=
$ifinfotmp
[
'macaddr'
];
$ifinfo
[
'macaddr'
]
=
$ifinfotmp
[
'macaddr'
];
$ifinfo
[
'ipaddr'
]
=
$ifinfotmp
[
'ipaddr'
];
$ifinfo
[
'ipaddr'
]
=
$ifinfotmp
[
'ipaddr'
];
$ifinfo
[
'subnet'
]
=
$ifinfotmp
[
'subnet'
];
$ifinfo
[
'subnet'
]
=
$ifinfotmp
[
'subnet'
];
$ifinfo
[
'linklocal'
]
=
get_interface_linklocal
(
$ifdescr
);
$ifinfo
[
'ipaddrv6'
]
=
get_interface_ipv6
(
$ifdescr
);
$ifinfo
[
'subnetv6'
]
=
get_interface_subnetv6
(
$ifdescr
);
if
(
isset
(
$ifinfotmp
[
'link0'
]))
{
if
(
isset
(
$ifinfotmp
[
'link0'
]))
{
$link0
=
'down'
;
$link0
=
'down'
;
}
}
$ifinfo
[
'linklocal'
]
=
get_interface_linklocal
(
$ifdescr
);
$ifinfo
[
'ipaddrv6'
]
=
get_interface_ipv6
(
$ifdescr
);
$ifinfo
[
'subnetv6'
]
=
get_interface_subnetv6
(
$ifdescr
);
$ifinfotmp
=
legacy_interface_stats
(
$chkif
);
$ifinfotmp
=
legacy_interface_stats
(
$chkif
);
$ifinfo
[
'status'
]
=
$ifinfotmp
[
'link state'
]
==
'2'
?
'up'
:
'down'
;
$ifinfo
[
'inerrs'
]
=
$ifinfotmp
[
'input errors'
];
$ifinfo
[
'inerrs'
]
=
$ifinfotmp
[
'input errors'
];
$ifinfo
[
'outerrs'
]
=
$ifinfotmp
[
'output errors'
];
$ifinfo
[
'outerrs'
]
=
$ifinfotmp
[
'output errors'
];
$ifinfo
[
'collisions'
]
=
$ifinfotmp
[
'collisions'
];
$ifinfo
[
'collisions'
]
=
$ifinfotmp
[
'collisions'
];
...
...
src/etc/inc/util.inc
View file @
9b94d2f2
...
@@ -902,10 +902,8 @@ function get_interface_list($only_active = false)
...
@@ -902,10 +902,8 @@ function get_interface_list($only_active = false)
foreach
(
$ifnames
as
$ifname
)
{
foreach
(
$ifnames
as
$ifname
)
{
$ifinfo
=
legacy_interface_stats
(
$ifname
);
$ifinfo
=
legacy_interface_stats
(
$ifname
);
if
(
isset
(
$ifinfo
[
'link state'
]))
{
if
(
$ifinfo
[
'link state'
]
==
'2'
)
{
if
(
$ifinfo
[
'link state'
]
==
'2'
)
{
$_ifnames
[]
=
$ifname
;
$_ifnames
[]
=
$ifname
;
}
}
}
}
}
...
...
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