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
2a2bca91
Commit
2a2bca91
authored
May 31, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system: mute resetting routes, they can error if not there
parent
b27abd7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
system.inc
src/etc/inc/system.inc
+5
-5
No files found.
src/etc/inc/system.inc
View file @
2a2bca91
<?php
/*
Copyright (C) 2016 Franco Fichtner <franco@opnsense.org>
Copyright (C) 2016
-2017
Franco Fichtner <franco@opnsense.org>
Copyright (C) 2004-2007 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>
All rights reserved.
...
...
@@ -506,9 +506,9 @@ function system_routing_configure($interface = '', $verbose = false)
;
elseif
(
is_ipaddrv4
(
$gatewayip
))
{
log_error
(
"ROUTING: setting IPv4 default route to
{
$gatewayip
}
"
);
mwexecf
(
'/sbin/route delete -inet %s'
,
'default'
);
mwexecf
(
'/sbin/route delete -inet %s'
,
'default'
,
true
);
if
(
$fargw
)
{
mwexecf
(
'/sbin/route delete -inet %s -interface %s'
,
array
(
$gatewayip
,
$defaultif
));
mwexecf
(
'/sbin/route delete -inet %s -interface %s'
,
array
(
$gatewayip
,
$defaultif
)
,
true
);
mwexecf
(
'/sbin/route add -inet %s -interface %s'
,
array
(
$gatewayip
,
$defaultif
));
}
mwexecf
(
'/sbin/route add -inet %s %s'
,
array
(
'default'
,
$gatewayip
));
...
...
@@ -521,9 +521,9 @@ function system_routing_configure($interface = '', $verbose = false)
$gatewayipv6
.=
"%
{
$defaultifv6
}
"
;
}
log_error
(
"ROUTING: setting IPv6 default route to
{
$gatewayipv6
}
"
);
mwexecf
(
'/sbin/route delete -inet6 %s %s'
,
array
(
'default'
,
$gatewayipv6
));
mwexecf
(
'/sbin/route delete -inet6 %s %s'
,
array
(
'default'
,
$gatewayipv6
)
,
true
);
if
(
$fargw
)
{
mwexecf
(
'/sbin/route delete -inet6 %s -interface %s'
,
array
(
$gatewayipv6
,
$defaultifv6
));
mwexecf
(
'/sbin/route delete -inet6 %s -interface %s'
,
array
(
$gatewayipv6
,
$defaultifv6
)
,
true
);
mwexecf
(
'/sbin/route add -inet6 %s -interface %s'
,
array
(
$gatewayipv6
,
$defaultifv6
));
}
mwexecf
(
'/sbin/route add -inet6 %s %s'
,
array
(
'default'
,
$gatewayipv6
));
...
...
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