Skip to content

Commit

Permalink
netflow: load needed ng_ether if not found yet
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jul 16, 2019
1 parent 049cc75 commit 4edbacc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/etc/rc.d/netflow
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,22 @@ SEQ

netflow_start()
{
is_running=`ngctl list | grep netflow_ | wc -l`
is_running=$(ngctl list | grep netflow_ | wc -l)

if [ $is_running -ne 0 ]; then
echo "already running"
return
fi

if ! kldstat -qm ng_ether; then
kldload ng_ether
fi

# configure interfaces
for interface in $netflow_interfaces
do
setup_interface "$interface"
for interface in $netflow_interfaces; do
setup_interface "$interface"
done

# forward netflow packets, make sure $netflow_int_destination forwards to localhost (127.0.0.1)
if [ "$netflow_destinations" != "" ]; then
netflow_port=`echo $netflow_int_destination | /usr/bin/sed 's/:/ /g' | /usr/bin/awk '{print $2}'`
Expand Down

0 comments on commit 4edbacc

Please sign in to comment.