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
c68ca487
Commit
c68ca487
authored
Aug 04, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(interfaces, lagg) add lacp_fast_timeout support
https://github.com/opnsense/core/issues/1105
parent
ee6a8076
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
interfaces.inc
src/etc/inc/interfaces.inc
+5
-0
interfaces_lagg_edit.php
src/www/interfaces_lagg_edit.php
+26
-0
No files found.
src/etc/inc/interfaces.inc
View file @
c68ca487
...
...
@@ -781,6 +781,11 @@ function interface_lagg_configure(&$lagg)
}
mwexec
(
"/sbin/ifconfig
{
$laggif
}
laggproto "
.
escapeshellarg
(
$lagg
[
'proto'
]));
if
(
!
empty
(
$lagg
[
'lacp_fast_timeout'
]))
{
mwexec
(
"/sbin/ifconfig
{
$laggif
}
lacp_fast_timeout"
);
}
elseif
(
$lagg
[
'proto'
]
==
'lacp'
)
{
mwexec
(
"/sbin/ifconfig
{
$laggif
}
-lacp_fast_timeout"
);
}
interfaces_bring_up
(
$laggif
);
...
...
src/www/interfaces_lagg_edit.php
View file @
c68ca487
...
...
@@ -94,6 +94,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig
[
'members'
]
=
isset
(
$a_laggs
[
$id
][
'members'
])
?
explode
(
","
,
$a_laggs
[
$id
][
'members'
])
:
array
();
$pconfig
[
'proto'
]
=
isset
(
$a_laggs
[
$id
][
'proto'
])
?
$a_laggs
[
$id
][
'proto'
]
:
null
;
$pconfig
[
'descr'
]
=
isset
(
$a_laggs
[
$id
][
'descr'
])
?
$a_laggs
[
$id
][
'descr'
]
:
null
;
$pconfig
[
'lacp_fast_timeout'
]
=
!
empty
(
$a_laggs
[
$id
][
'lacp_fast_timeout'
]);
}
elseif
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'POST'
)
{
// validate and save form data
if
(
!
empty
(
$a_laggs
[
$_POST
[
'id'
]]))
{
...
...
@@ -126,6 +127,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$lagg
[
'descr'
]
=
$pconfig
[
'descr'
];
$lagg
[
'laggif'
]
=
$pconfig
[
'laggif'
];
$lagg
[
'proto'
]
=
$pconfig
[
'proto'
];
$lagg
[
'lacp_fast_timeout'
]
=
!
empty
(
$pconfig
[
'lacp_fast_timeout'
]);
if
(
isset
(
$id
))
{
$lagg
[
'laggif'
]
=
$a_laggs
[
$id
][
'laggif'
];
}
...
...
@@ -156,6 +158,21 @@ legacy_html_escape_form_data($pconfig);
?>
<body>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
"
#proto
"
).
change
(
function
(){
if
(
$
(
"
#proto
"
).
val
()
==
'
lacp
'
)
{
$
(
"
#lacp_fast_timeout
"
).
parent
().
parent
().
show
();
$
(
"
#lacp_fast_timeout
"
).
prop
(
"
disabled
"
,
false
);
}
else
{
$
(
"
#lacp_fast_timeout
"
).
parent
().
parent
().
hide
();
$
(
"
#lacp_fast_timeout
"
).
prop
(
"
disabled
"
,
true
);
}
});
$
(
"
#proto
"
).
change
();
});
</script>
<?php
include
(
"fbegin.inc"
);
?>
<section
class=
"page-content-main"
>
<div
class=
"container-fluid"
>
...
...
@@ -258,6 +275,15 @@ legacy_html_escape_form_data($pconfig);
</div>
</td>
</tr>
<tr>
<td><a
id=
"help_for_lacp_fast_timeout"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"Fast timeout"
);
?>
</td>
<td>
<input
name=
"lacp_fast_timeout"
id=
"lacp_fast_timeout"
type=
"checkbox"
value=
"yes"
<?=
!
empty
(
$pconfig
[
'lacp_fast_timeout'
])
?
"checked=
\"
checked
\"
"
:
""
;
?>
/>
<div
class=
"hidden"
for=
"help_for_lacp_fast_timeout"
>
<?=
gettext
(
"Enable lacp fast-timeout on the interface."
);
?>
</div>
</td>
</tr>
<tr>
<td
width=
"22%"
valign=
"top"
>
</td>
<td
width=
"78%"
>
...
...
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