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
8da32378
Commit
8da32378
authored
Nov 04, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) remove cache stuff from find_interface_ipv6_ll
parent
154b9a29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
22 deletions
+13
-22
gwlb.inc
src/etc/inc/gwlb.inc
+1
-1
interfaces.inc
src/etc/inc/interfaces.inc
+12
-21
No files found.
src/etc/inc/gwlb.inc
View file @
8da32378
...
...
@@ -188,7 +188,7 @@ EOD;
if
(
$gateway
[
'monitor'
]
==
$gateway
[
'gateway'
])
{
/* link locals really need a different src ip */
if
(
is_linklocal
(
$gateway
[
'gateway'
]))
{
$gwifip
=
find_interface_ipv6_ll
(
$gateway
[
'interface'
]
,
true
);
$gwifip
=
find_interface_ipv6_ll
(
$gateway
[
'interface'
]);
}
else
{
$gwifip
=
find_interface_ipv6
(
$gateway
[
'interface'
]);
}
...
...
src/etc/inc/interfaces.inc
View file @
8da32378
...
...
@@ -4524,29 +4524,20 @@ function find_interface_ipv6($interface) {
/*
* find_interface_ipv6_ll($interface): return the interface ipv6 link local (first found)
*/
function
find_interface_ipv6_ll
(
$interface
,
$flush
=
false
)
{
global
$interface_llv6_arr_cache
;
global
$config
;
$interface
=
str_replace
(
"
\n
"
,
""
,
$interface
);
if
(
!
does_interface_exist
(
$interface
))
return
;
/* Setup IP cache */
if
(
!
isset
(
$interface_llv6_arr_cache
[
$interface
])
or
$flush
)
{
$ifinfo
=
pfSense_getall_interface_addresses
(
$interface
);
foreach
(
$ifinfo
as
$line
)
{
if
(
strstr
(
$line
,
":"
))
{
$parts
=
explode
(
"/"
,
$line
);
if
(
is_linklocal
(
$parts
[
0
]))
{
$ifinfo
[
'linklocal'
]
=
$parts
[
0
];
function
find_interface_ipv6_ll
(
$interface
)
{
$interface
=
trim
(
$interface
);
if
(
does_interface_exist
(
$interface
))
{
$ifinfo
=
pfSense_getall_interface_addresses
(
$interface
);
foreach
(
$ifinfo
as
$line
)
{
if
(
strstr
(
$line
,
":"
))
{
$parts
=
explode
(
"/"
,
$line
);
if
(
is_linklocal
(
$parts
[
0
]))
{
return
$parts
[
0
];
}
}
}
}
}
$interface_llv6_arr_cache
[
$interface
]
=
$ifinfo
[
'linklocal'
];
}
return
$interface_llv6_arr_cache
[
$interface
];
return
null
;
}
function
find_interface_subnet
(
$interface
,
$flush
=
false
)
{
...
...
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