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
04a1d6c4
Commit
04a1d6c4
authored
Oct 23, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter: minor style issues
parent
b406098d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
filter.inc
src/etc/inc/filter.inc
+5
-6
No files found.
src/etc/inc/filter.inc
View file @
04a1d6c4
...
...
@@ -400,7 +400,6 @@ function filter_configure_sync()
if
(
file_exists
(
"/var/run/booting"
))
{
echo
"."
;
}
update_filter_reload_status
(
gettext
(
"Generating Limiter rules"
));
update_filter_reload_status
(
gettext
(
"Generating NAT rules"
));
/* generate nat rules */
$natrules
=
filter_nat_rules_generate
(
$FilterIflist
);
...
...
@@ -947,7 +946,7 @@ function filter_get_direct_networks_list(&$FilterIflist, $returnsubnetsonly = tr
if
(
is_subnet
(
$subnet
)
&&
!
(
is_subnetv4
(
$subnet
)
&&
$vip
[
'subnet_bits'
]
==
32
)
&&
!
(
is_subnetv6
(
$subnet
)
&&
$vip
[
'subnet_bits'
]
==
128
))
{
if
(
is_subnetv4
(
$subnet
))
{
$subnet
=
gen_subnet
(
$vip
[
'subnet'
],
$vip
[
'subnet_bits'
])
.
"/
{
$vip
[
'subnet_bits'
]
}
"
;
}
else
if
(
is_subnetv6
(
$subnet
))
{
}
elseif
(
is_subnetv6
(
$subnet
))
{
$subnet
=
gen_subnetv6
(
$vip
[
'subnet'
],
$vip
[
'subnet_bits'
])
.
"/
{
$vip
[
'subnet_bits'
]
}
"
;
}
if
(
$returnsubnetsonly
)
{
...
...
@@ -964,7 +963,7 @@ function filter_get_direct_networks_list(&$FilterIflist, $returnsubnetsonly = tr
if
(
is_subnet
(
$netent
[
'network'
]))
{
if
(
$returnsubnetsonly
)
{
$networks_arr
[]
=
$netent
[
'network'
];
}
else
if
(
isset
(
$GatewaysList
[
$netent
[
'gateway'
]]))
{
}
elseif
(
isset
(
$GatewaysList
[
$netent
[
'gateway'
]]))
{
$networks_arr
[]
=
array
(
'subnet'
=>
$netent
[
'network'
],
'if'
=>
$GatewaysList
[
$netent
[
'gateway'
]][
'friendlyiface'
],
...
...
@@ -1091,7 +1090,7 @@ function filter_generate_optcfg_array()
}
else
{
$oic
[
'vips'
][
$vipidx
][
'sn'
]
=
$vip
[
'subnet_bits'
];
}
}
else
if
(
is_ipaddrv6
(
$vip
[
'subnet'
]))
{
}
elseif
(
is_ipaddrv6
(
$vip
[
'subnet'
]))
{
if
(
!
is_array
(
$oic
[
'vips6'
]))
{
$oic
[
'vips6'
]
=
array
();
}
...
...
@@ -1753,7 +1752,7 @@ function filter_nat_rules_generate(&$FilterIflist)
$localport
=
alias_expand
(
$rule
[
'local-port'
]);
if
(
!
$localport
||
$dstport
[
0
]
==
$localport
)
{
$localport
=
""
;
}
else
if
(
is_alias
(
$rule
[
'local-port'
]))
{
}
elseif
(
is_alias
(
$rule
[
'local-port'
]))
{
$localport
=
filter_expand_alias
(
$rule
[
'local-port'
]);
if
(
$localport
)
{
$localport
=
explode
(
" "
,
trim
(
$localport
));
...
...
@@ -2895,7 +2894,7 @@ EOD;
$rule_arr1
[]
=
filter_generate_user_rule_arr
(
$FilterIflist
,
$rule
);
$rule
[
'ipprotocol'
]
=
"inet6"
;
$rule_arr1
[]
=
filter_generate_user_rule_arr
(
$FilterIflist
,
$rule
);
}
else
if
(
is_interface_group
(
$rule
[
'interface'
])
||
in_array
(
$rule
[
'interface'
],
$vpn_and_ppp_ifs
))
{
}
elseif
(
is_interface_group
(
$rule
[
'interface'
])
||
in_array
(
$rule
[
'interface'
],
$vpn_and_ppp_ifs
))
{
$rule
[
'ipprotocol'
]
=
"inet"
;
$rule_arr2
[]
=
filter_generate_user_rule_arr
(
$FilterIflist
,
$rule
);
$rule
[
'ipprotocol'
]
=
"inet6"
;
...
...
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