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
1be6437c
Commit
1be6437c
authored
Apr 07, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gwlb: better log message for monitor routes
parent
f729d881
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
gwlb.inc
src/etc/inc/gwlb.inc
+4
-4
No files found.
src/etc/inc/gwlb.inc
View file @
1be6437c
...
...
@@ -175,7 +175,7 @@ EOD;
/* flush the monitor unconditionally */
if
(
is_ipaddrv4
(
$gateway
[
'gateway'
])
&&
$gateway
[
'monitor'
]
!=
$gateway
[
'gateway'
])
{
log_error
(
"Removing static route for monitor
{
$gateway
[
'monitor'
]
}
"
);
log_error
(
"Removing static route for monitor
{
$gateway
[
'monitor'
]
}
via
{
$gateway
[
'gateway'
]
}
"
);
mwexec
(
"/sbin/route delete -host "
.
escapeshellarg
(
$gateway
[
'monitor'
]),
true
);
}
...
...
@@ -191,7 +191,7 @@ EOD;
* not strictly necessary but is a added level of protection.
*/
if
(
is_ipaddrv4
(
$gateway
[
'gateway'
])
&&
$gateway
[
'monitor'
]
!=
$gateway
[
'gateway'
])
{
log_error
(
"Adding static route for monitor
through
{
$gateway
[
'gateway'
]
}
"
);
log_error
(
"Adding static route for monitor
{
$gateway
[
'monitor'
]
}
via
{
$gateway
[
'gateway'
]
}
"
);
mwexec
(
"/sbin/route add -host "
.
escapeshellarg
(
$gateway
[
'monitor'
])
.
" "
.
escapeshellarg
(
$gateway
[
'gateway'
]),
true
);
}
...
...
@@ -226,7 +226,7 @@ EOD;
/* flush the monitor unconditionally */
if
(
is_ipaddrv6
(
$gateway
[
'gateway'
])
&&
$gateway
[
'monitor'
]
!=
$gateway
[
'gateway'
])
{
log_error
(
"Removing static route for monitor
{
$gateway
[
'monitor'
]
}
"
);
log_error
(
"Removing static route for monitor
{
$gateway
[
'monitor'
]
}
via
{
$gateway
[
'gateway'
]
}
"
);
mwexec
(
"/sbin/route delete -host -inet6 "
.
escapeshellarg
(
$gateway
[
'monitor'
]),
true
);
}
...
...
@@ -242,7 +242,7 @@ EOD;
* not strictly necessary but is a added level of protection.
*/
if
(
is_ipaddrv6
(
$gateway
[
'gateway'
])
&&
$gateway
[
'monitor'
]
!=
$gateway
[
'gateway'
])
{
log_error
(
"Adding static route for monitor
through
{
$gateway
[
'gateway'
]
}
"
);
log_error
(
"Adding static route for monitor
{
$gateway
[
'monitor'
]
}
via
{
$gateway
[
'gateway'
]
}
"
);
mwexec
(
"/sbin/route add -host -inet6 "
.
escapeshellarg
(
$gateway
[
'monitor'
])
.
" "
.
escapeshellarg
(
$gateway
[
'gateway'
]),
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