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
ebc29f92
Commit
ebc29f92
authored
Apr 20, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(netflow) when wide isn't wide.... choose different index strategy
parent
73fcb871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
netflow
src/etc/rc.d/netflow
+14
-2
No files found.
src/etc/rc.d/netflow
View file @
ebc29f92
...
...
@@ -53,12 +53,24 @@ setup_interface()
nfversion
=
""
fi
interface
=
$1
# determine (snmp) ifIndex
ifIndex
=
$(
/usr/bin/netstat
-Win
| /usr/bin/grep Link# |
awk
'{if ( $1 == "'
"
$interface
"
'" ) {print $3 }}'
| /usr/bin/sed
's/<Link#//g'
| /usr/bin/sed
's/>//g'
)
if
[
"
$ifIndex
"
==
""
]
;
then
ifIndex
=
0
found
=
0
for
item
in
`
/sbin/ifconfig
-l
`
do
let
ifIndex
=
ifIndex + 1
>
/dev/null 2>&1
if
[
"
$item
"
=
"
$interface
"
]
;
then
found
=
1
break
fi
done
if
[
"
$found
"
==
"0"
]
;
then
echo
"error : interface
$interface
not found"
return
fi
# disable ingress (traffic to this host) for selected interfaces
# avoids counting traffic going through this firewall double when using nat
if
[
!
-z
"
`
echo
"
$netflow_egress_only
"
|
grep
"
$interface
"
`
"
]
;
then
...
...
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