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
a0c784a6
Commit
a0c784a6
authored
Apr 07, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some more package code / garbage code
parent
edb37740
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
19 deletions
+8
-19
vpn.inc
src/etc/inc/vpn.inc
+1
-1
rc.newwanip
src/etc/rc.newwanip
+7
-18
No files found.
src/etc/inc/vpn.inc
View file @
a0c784a6
...
...
@@ -867,7 +867,7 @@ function vpn_ipsec_force_reload($interface = "") {
$ipseccfg
=
$config
[
'ipsec'
];
if
(
!
empty
(
$interface
)
&&
is_array
(
$ipseccfg
[
'phase1'
]))
{
if
(
!
empty
(
$interface
)
&&
is
set
(
$ipseccfg
[
'phase1'
])
&&
is
_array
(
$ipseccfg
[
'phase1'
]))
{
$found
=
false
;
foreach
(
$ipseccfg
[
'phase1'
]
as
$ipsec
)
{
if
(
!
isset
(
$ipsec
[
'disabled'
])
&&
(
$ipsec
[
'interface'
]
==
$interface
))
{
...
...
src/etc/rc.newwanip
View file @
a0c784a6
...
...
@@ -45,16 +45,6 @@ if (file_exists('/var/run/booting')) {
return
;
}
function
restart_packages
()
{
global
$oldip
,
$curwanip
,
$g
;
/* restart packages */
system_ntp_configure
(
false
);
mwexec_bg
(
"/usr/local/sbin/ntpdate_sync_once.sh"
,
false
,
true
);
log_error
(
"
{
$g
[
'product_name'
]
}
package system has detected an ip change
$oldip
->
$curwanip
... Restarting packages."
);
configd_run
(
"service reload packages"
);
}
/* Interface IP address has changed */
$argument
=
str_replace
(
"
\n
"
,
""
,
$argv
[
1
]);
...
...
@@ -74,6 +64,9 @@ $interface_descr = convert_friendly_interface_to_friendly_descr($interface);
if
(
is_array
(
$config
[
'interfaces'
][
$interface
])
&&
!
isset
(
$config
[
'interfaces'
][
$interface
][
'enable'
]))
{
log_error
(
"Interface is disabled, nothing to do."
);
return
;
}
elseif
(
empty
(
$interface
))
{
log_error
(
"Interface is empty, nothing to do."
);
return
;
}
if
(
empty
(
$argument
))
...
...
@@ -100,12 +93,6 @@ if ($curwanip == "0.0.0.0" || !is_ipaddr($curwanip)) {
}
}
/* XXX: This really possible? */
if
(
empty
(
$interface
))
{
filter_configure
();
restart_packages
();
return
;
}
$oldip
=
"0.0.0.0"
;
if
(
file_exists
(
"
{
$g
[
'vardb_path'
]
}
/
{
$interface
}
_cacheip"
))
...
...
@@ -210,8 +197,10 @@ if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interface
/* restart snmp */
services_snmpd_configure
();
restart_packages
();
/* reconfigure ntpd */
system_ntp_configure
(
false
);
mwexec_bg
(
"/usr/local/sbin/ntpdate_sync_once.sh"
,
false
,
true
);
}
/* signal filter reload */
...
...
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