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
a0452653
Commit
a0452653
authored
Jul 13, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) cleanup rc.interfaces_wan_configure
parent
d70cb582
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
util.inc
src/etc/inc/util.inc
+5
-1
rc.interfaces_wan_configure
src/etc/rc.interfaces_wan_configure
+6
-5
No files found.
src/etc/inc/util.inc
View file @
a0452653
...
...
@@ -339,7 +339,11 @@ function is_ipaddrv6($ipaddr) {
$tmpip
=
explode
(
"%"
,
$ipaddr
);
$ipaddr
=
$tmpip
[
0
];
}
return
Net_IPv6
::
checkIPv6
(
$ipaddr
);
if
(
strpos
(
$ipaddr
,
":"
)
===
false
)
{
return
false
;
}
else
{
return
Net_IPv6
::
checkIPv6
(
$ipaddr
);
}
}
/* returns true if $ipaddr is a valid dotted IPv4 address */
...
...
src/etc/rc.interfaces_wan_configure
View file @
a0452653
...
...
@@ -31,10 +31,11 @@ require_once("config.inc");
require_once
(
"functions.inc"
);
require_once
(
"filter.inc"
);
$argument
=
str_replace
(
"
\n
"
,
""
,
$argv
[
1
]);
if
(
empty
(
$argument
))
interface_configure
(
"wan"
);
else
{
if
(
!
empty
(
$config
[
'interfaces'
][
$argument
]))
if
(
!
empty
(
$argv
[
1
]))
{
$argument
=
str_replace
(
"
\n
"
,
""
,
$argv
[
1
]);
if
(
!
empty
(
$config
[
'interfaces'
][
$argument
]))
{
interface_configure
(
$argument
);
}
}
else
{
interface_configure
(
"wan"
);
}
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