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
fefd9baf
Commit
fefd9baf
authored
Jan 09, 2015
by
Jos Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some typos introduced in
ab1cadea
parent
ab1cadea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
gwlb.inc
src/etc/inc/gwlb.inc
+2
-1
interfaces.inc
src/etc/inc/interfaces.inc
+5
-4
system.inc
src/etc/inc/system.inc
+4
-2
No files found.
src/etc/inc/gwlb.inc
View file @
fefd9baf
...
@@ -778,9 +778,10 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
...
@@ -778,9 +778,10 @@ function fixup_default_gateway($ipprotocol, $gateways_status, $gateways_arr) {
}
else
{
}
else
{
$inetfamily
=
"-inet"
;
$inetfamily
=
"-inet"
;
}
}
if
(
$defaultgw
!=
$gateways_arr
[
$dfltgwname
][
'gateway'
])
if
(
$defaultgw
!=
$gateways_arr
[
$dfltgwname
][
'gateway'
])
{
mwexec
(
"/sbin/route delete
{
$inetfamily
}
default
{
$gateways_arr
[
$dfltgwname
][
'gateway'
]
}
"
);
mwexec
(
"/sbin/route delete
{
$inetfamily
}
default
{
$gateways_arr
[
$dfltgwname
][
'gateway'
]
}
"
);
mwexec
(
"/sbin/route add
{
$inetfamily
}
default
{
$gateways_arr
[
$dfltgwname
][
'gateway'
]
}
"
);
mwexec
(
"/sbin/route add
{
$inetfamily
}
default
{
$gateways_arr
[
$dfltgwname
][
'gateway'
]
}
"
);
}
}
}
}
}
...
...
src/etc/inc/interfaces.inc
View file @
fefd9baf
...
@@ -3425,10 +3425,10 @@ function interface_6rd_configure($interface = "wan", $wancfg) {
...
@@ -3425,10 +3425,10 @@ function interface_6rd_configure($interface = "wan", $wancfg) {
file_put_contents
(
"
{
$g
[
'tmp_path'
]
}
/
{
$wanif
}
_defaultgwv6"
,
"
{
$rd6brgw
}
\n
"
);
file_put_contents
(
"
{
$g
[
'tmp_path'
]
}
/
{
$wanif
}
_defaultgwv6"
,
"
{
$rd6brgw
}
\n
"
);
$ip4gateway
=
get_interface_gateway
(
$interface
);
$ip4gateway
=
get_interface_gateway
(
$interface
);
if
(
is_ipaddrv4
(
$ip4gateway
))
if
(
is_ipaddrv4
(
$ip4gateway
))
{
mwexec
(
"/sbin/route delete -host "
.
escapeshellarg
(
$wancfg
[
'gateway-6rd'
]));
mwexec
(
"/sbin/route delete -host "
.
escapeshellarg
(
$wancfg
[
'gateway-6rd'
]));
mwexec
(
"/sbin/route add -host "
.
escapeshellarg
(
$wancfg
[
'gateway-6rd'
])
.
"
{
$ip4gateway
}
"
);
mwexec
(
"/sbin/route add -host "
.
escapeshellarg
(
$wancfg
[
'gateway-6rd'
])
.
"
{
$ip4gateway
}
"
);
}
/* configure dependent interfaces */
/* configure dependent interfaces */
if
(
!
$g
[
'booting'
])
if
(
!
$g
[
'booting'
])
link_interface_to_track6
(
$interface
,
"update"
);
link_interface_to_track6
(
$interface
,
"update"
);
...
@@ -3523,10 +3523,11 @@ function interface_6to4_configure($interface = "wan", $wancfg){
...
@@ -3523,10 +3523,11 @@ function interface_6to4_configure($interface = "wan", $wancfg){
file_put_contents
(
"
{
$g
[
'tmp_path'
]
}
/
{
$wanif
}
_defaultgwv6"
,
"
{
$stfbrgw
}
"
);
file_put_contents
(
"
{
$g
[
'tmp_path'
]
}
/
{
$wanif
}
_defaultgwv6"
,
"
{
$stfbrgw
}
"
);
$ip4gateway
=
get_interface_gateway
(
$interface
);
$ip4gateway
=
get_interface_gateway
(
$interface
);
if
(
is_ipaddrv4
(
$ip4gateway
))
if
(
is_ipaddrv4
(
$ip4gateway
))
{
mwexec
(
"/sbin/route delete -host 192.88.99.1"
);
mwexec
(
"/sbin/route delete -host 192.88.99.1"
);
mwexec
(
"/sbin/route add -host 192.88.99.1
{
$ip4gateway
}
"
);
mwexec
(
"/sbin/route add -host 192.88.99.1
{
$ip4gateway
}
"
);
}
if
(
!
$g
[
'booting'
])
if
(
!
$g
[
'booting'
])
link_interface_to_track6
(
$interface
,
"update"
);
link_interface_to_track6
(
$interface
,
"update"
);
...
...
src/etc/inc/system.inc
View file @
fefd9baf
...
@@ -550,12 +550,14 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
...
@@ -550,12 +550,14 @@ function system_staticroutes_configure($interface = "", $update_dns = false) {
$cmd
=
"
{
$inet
}
{
$blackhole
}
"
.
escapeshellarg
(
$ip
)
.
" "
;
$cmd
=
"
{
$inet
}
{
$blackhole
}
"
.
escapeshellarg
(
$ip
)
.
" "
;
if
(
is_subnet
(
$ip
))
if
(
is_subnet
(
$ip
))
if
(
is_ipaddr
(
$gatewayip
))
if
(
is_ipaddr
(
$gatewayip
))
{
mwexec
(
"/sbin/route delete"
.
$cmd
.
escapeshellarg
(
$gatewayip
));
mwexec
(
"/sbin/route delete"
.
$cmd
.
escapeshellarg
(
$gatewayip
));
mwexec
(
"/sbin/route add"
.
$cmd
.
escapeshellarg
(
$gatewayip
));
mwexec
(
"/sbin/route add"
.
$cmd
.
escapeshellarg
(
$gatewayip
));
else
if
(
!
empty
(
$interfacegw
))
}
else
if
(
!
empty
(
$interfacegw
))
{
mwexec
(
"/sbin/route delete"
.
$cmd
.
"-iface "
.
escapeshellarg
(
$interfacegw
));
mwexec
(
"/sbin/route delete"
.
$cmd
.
"-iface "
.
escapeshellarg
(
$interfacegw
));
mwexec
(
"/sbin/route add"
.
$cmd
.
"-iface "
.
escapeshellarg
(
$interfacegw
));
mwexec
(
"/sbin/route add"
.
$cmd
.
"-iface "
.
escapeshellarg
(
$interfacegw
));
}
}
}
}
}
unset
(
$gateways_arr
);
unset
(
$gateways_arr
);
...
...
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