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
8972c57e
Commit
8972c57e
authored
Mar 25, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix config handling on empty tags for dhcp / ipsec
parent
4e929dab
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
4 deletions
+36
-4
interfaces.inc
src/etc/inc/interfaces.inc
+6
-2
services.inc
src/etc/inc/services.inc
+2
-2
vpn_ipsec.php
src/www/vpn_ipsec.php
+4
-0
vpn_ipsec_keys.php
src/www/vpn_ipsec_keys.php
+4
-0
vpn_ipsec_keys_edit.php
src/www/vpn_ipsec_keys_edit.php
+4
-0
vpn_ipsec_mobile.php
src/www/vpn_ipsec_mobile.php
+4
-0
vpn_ipsec_phase1.php
src/www/vpn_ipsec_phase1.php
+4
-0
vpn_ipsec_phase2.php
src/www/vpn_ipsec_phase2.php
+4
-0
vpn_ipsec_settings.php
src/www/vpn_ipsec_settings.php
+4
-0
No files found.
src/etc/inc/interfaces.inc
View file @
8972c57e
...
...
@@ -5241,7 +5241,9 @@ function interfaces_staticarp_configure($if)
if
(
is_array
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]))
{
foreach
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]
as
$arpent
)
{
mwexec
(
"/usr/sbin/arp -s "
.
escapeshellarg
(
$arpent
[
'ipaddr'
])
.
" "
.
escapeshellarg
(
$arpent
[
'mac'
]));
if
(
isset
(
$arpent
[
'ipaddr'
]))
{
mwexec
(
"/usr/sbin/arp -s "
.
escapeshellarg
(
$arpent
[
'ipaddr'
])
.
" "
.
escapeshellarg
(
$arpent
[
'mac'
]));
}
}
...
...
@@ -5252,7 +5254,9 @@ function interfaces_staticarp_configure($if)
if
(
isset
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]))
{
foreach
(
$config
[
'dhcpd'
][
$if
][
'staticmap'
]
as
$arpent
)
{
if
(
isset
(
$arpent
[
'arp_table_static_entry'
]))
{
mwexec
(
"/usr/sbin/arp -s "
.
escapeshellarg
(
$arpent
[
'ipaddr'
])
.
" "
.
escapeshellarg
(
$arpent
[
'mac'
]));
if
(
isset
(
$arpent
[
'ipaddr'
]))
{
mwexec
(
"/usr/sbin/arp -s "
.
escapeshellarg
(
$arpent
[
'ipaddr'
])
.
" "
.
escapeshellarg
(
$arpent
[
'mac'
]));
}
}
}
}
...
...
src/etc/inc/services.inc
View file @
8972c57e
...
...
@@ -496,7 +496,7 @@ EOPP;
$all_pools
=
array
();
$all_pools
[]
=
$dhcpifconf
;
if
(
is_array
(
$dhcpifconf
[
'pool'
]))
{
if
(
is_array
(
$dhcpifconf
[
'pool'
])
&&
isset
(
$dhcpifconf
[
'pool'
][
'range'
])
)
{
$all_pools
=
array_merge
(
$all_pools
,
$dhcpifconf
[
'pool'
]);
}
...
...
@@ -546,7 +546,7 @@ EOPP;
/* Create classes - These all contain comma separated lists. Join them into one
big comma separated string then split them all up. */
$all_mac_strings
=
array
();
if
(
is_array
(
$dhcpifconf
[
'pool'
]))
{
if
(
is_array
(
$dhcpifconf
[
'pool'
])
&&
isset
(
$dhcpifconf
[
'pool'
][
'range'
])
)
{
foreach
(
$all_pools
as
$poolconf
)
{
$all_mac_strings
[]
=
$poolconf
[
'mac_allow'
];
$all_mac_strings
[]
=
$poolconf
[
'mac_deny'
];
...
...
src/www/vpn_ipsec.php
View file @
8972c57e
...
...
@@ -34,6 +34,10 @@ require_once("shaper.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'phase1'
]))
$config
[
'ipsec'
][
'phase1'
]
=
array
();
...
...
src/www/vpn_ipsec_keys.php
View file @
8972c57e
...
...
@@ -32,6 +32,10 @@ require_once("ipsec.inc");
require_once
(
"vpn.inc"
);
require_once
(
"filter.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'mobilekey'
]))
{
$config
[
'ipsec'
][
'mobilekey'
]
=
array
();
}
...
...
src/www/vpn_ipsec_keys_edit.php
View file @
8972c57e
...
...
@@ -31,6 +31,10 @@ require_once("guiconfig.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'mobilekey'
]))
{
$config
[
'ipsec'
][
'mobilekey'
]
=
array
();
}
...
...
src/www/vpn_ipsec_mobile.php
View file @
8972c57e
...
...
@@ -31,6 +31,10 @@ require_once("guiconfig.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'phase1'
]))
$config
[
'ipsec'
][
'phase1'
]
=
array
();
...
...
src/www/vpn_ipsec_phase1.php
View file @
8972c57e
...
...
@@ -33,6 +33,10 @@ require_once("guiconfig.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'phase1'
]))
$config
[
'ipsec'
][
'phase1'
]
=
array
();
...
...
src/www/vpn_ipsec_phase2.php
View file @
8972c57e
...
...
@@ -32,6 +32,10 @@ require_once("guiconfig.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
if
(
!
is_array
(
$config
[
'ipsec'
][
'client'
]))
$config
[
'ipsec'
][
'client'
]
=
array
();
...
...
src/www/vpn_ipsec_settings.php
View file @
8972c57e
...
...
@@ -33,6 +33,10 @@ require_once("shaper.inc");
require_once
(
"ipsec.inc"
);
require_once
(
"vpn.inc"
);
if
(
!
is_array
(
$config
[
'ipsec'
]))
{
$config
[
'ipsec'
]
=
array
();
}
$pconfig
[
'noinstalllanspd'
]
=
$config
[
'system'
][
'noinstalllanspd'
];
$pconfig
[
'preferoldsa_enable'
]
=
isset
(
$config
[
'ipsec'
][
'preferoldsa'
]);
foreach
(
$ipsec_loglevels
as
$lkey
=>
$ldescr
)
{
...
...
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