History log of /freebsd-9.3-release/sys/netgraph/netflow/ng_netflow.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 260278 04-Jan-2014 dim

MFC r260048:

In sys/netgraph/netflow, use __FBSDID() instead of old-style rcs_id[].


# 243983 07-Dec-2012 melifaro

MFC r241446,r241501

Add NG_NETFLOW_V9INFO_TYPE command to be able to request netflowv9-specific
data.

Submitted by: Dmitry Luhtionov <dmitryluhtionov at gmail.com>


# 238295 09-Jul-2012 melifaro

Merge r237162, r237163, r237164, r237226.

Fix improper L4 header handling for IPv6 packets passed via DLT_RAW.
Set netflow v9 observation domain value to fib number instead of node id.
This fixes multi-fib netflow v9 export.
Use time_uptime instead of getnanotime for accouting integer number of seconds.
Simplify IP pointer recovery in case of mbuf reallocation.

Approved by: ae(mentor)
Approved by: re


# 234557 21-Apr-2012 melifaro

MFC r232921:

Use rt_numfibs variable instead of compile-time RT_NUMFIBS.

Approved by: kib(mentor)


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 223787 05-Jul-2011 glebius

o Eliminate flow6_hash_entry in favor of flow_hash_entry. We don't need
a separate struct to start a slist of semi-opaque structs. This
makes some code more compact.
o Rewrite ng_netflow_flow_show() and its API/ABI:
- Support for IPv6 is added.
- Request and response now use same struct. Structure specifies
version (6 or 4), index of last retrieved hash, and also index
of last retrieved entry in the hash entry.


# 220769 18-Apr-2011 glebius

ng_netflow_cache_init() can be void.


# 220768 18-Apr-2011 glebius

Node constructor methods are supposed to be called in syscall
context always. Convert nodes to consistently use M_WAITOK flag
for memory allocation.

Reviewed by: julian


# 219182 02-Mar-2011 glebius

Add support for NetFlow version 9 into ng_netflow(4) node.

Submitted by: Alexander V. Chernikov <melifaro ipfw.ru>


# 205636 25-Mar-2010 glebius

Remove disabled code. In 99% cases exports are send to ng_ksocket(4), which
already forces queued mode, so what was suggested in disabled code is already
done.


# 192032 13-May-2009 mav

Fix copy-paste bug in NGM_NETFLOW_SETCONFIG argument size verification.

PR: kern/134220
Submitted by: Eugene Mychlo
MFC after: 1 week


# 184205 23-Oct-2008 des

Retire the MALLOC and FREE macros. They are an abomination unto style(9).

MFC after: 3 months


# 183693 08-Oct-2008 mav

Add ability to generate egress netflow instead or in addition to ingress.
Use mbuf tagging for accounted packets to not account packets twice when
both ingress and egress netflow enabled.
To keep compatibility new "setconfig" message added to control new
functionality. By default node works as before, doing only ingress
accounting without using mbuf tags.

Reviewed by: glebius


# 178250 16-Apr-2008 kris

Replace callout_init(..., 1) with callout_init(..., CALLOUT_MPSAFE) for
better grep-compliance and to standardize with the rest of the kernel.

Reviewed by: jhb
MFC after: 1 week


# 175934 03-Feb-2008 mav

Revert previous commit.
glebius@ noticed that it was not a bug, but undocumented feature.


# 175721 27-Jan-2008 mav

Run expire even without export hook connected.

PR: kern/119839


# 167990 28-Mar-2007 glebius

Bump maximum number of interface hooks to the maximum possible value.
This will increase the memory consumption for more than 1 Mb, but this
is required for operation on multiinterface access concentrators running
mpd.

Requested by: Alexander Motin


# 163247 11-Oct-2006 glebius

Recognize 802.1q frames in Ethernet input and process them.

PR: kern/101162
Submitted by: CoolDavid (Tseng Guo-Fu) <cooldavid cdpa.nsysu.edu.tw>


# 154354 14-Jan-2006 glebius

Correct off-by-one errors.

Found with: Coverity Prevent(tm)


# 153791 28-Dec-2005 glebius

In ng_netflow_disconnect() check whether we are working with "iface"
or with "out" hook, and clear the right pointer.

Reported by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>


# 148091 17-Jul-2005 glebius

Check that we have first fragment before pulling up TCP/UDP header.


# 146092 11-May-2005 glebius

A new version of NetFlow node.

The most significant changes are:
- Use UMA zone instead of own chunk of memory.
- Lock each hash entry separately.
- Expire items "actively" - interrupt method can expire flows
from hash slot, when it searches through it.
- Remove global tailqueue. Make callout thread search through
every hash slot.
- Export datagram is detached from private data and filled. If
it is incomplete, it is attached back. Another thread will
continue working with it.

Lesser, but also important speedups:
- Flows in hash slot are stored in tailqueue. Whenever a flow is
hit, it is moved to the begging, so it can be located quicker.
- When callout thread works with hash slot it bails out if
slot mutex is contested.


# 143988 22-Mar-2005 glebius

Add a possibility to bypass unmodified accounted data to special
hook(s). Data received on these hook(s) is sent back to ifaceX hook(s).


# 143924 21-Mar-2005 glebius

Refactor node so that it does not modify mbuf contents. Next step would
be pass-thru mode, when traffic is not copied by ng_tee, but passed thru
ng_netflow.

Changes made:

- In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
IP header, and TCP/UDP header.
- Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
headers are guaranteed to by after it.
- Merge make_flow_rec() function into ng_netflow_flow_add().


# 143923 21-Mar-2005 glebius

Refactor node so that it does not modify mbuf contents. Next step would
be pass-thru mode, when traffic is not copied by ng_tee, but passed thru
ng_netflow.

Changes made:

- In ng_netflow_rcvdata() do all necessary pulluping: Ethernet header,
IP header, and TCP/UDP header.
- Pass only pointer to struct ip to ng_netflow_flow_add(). Any TCP/UDP
headers are guaranteed to by after it.
- Merge make_flow_rec() function into ng_netflow_flow_add().


# 143912 21-Mar-2005 glebius

Plug item leak, which occured when m_pullup() failed.


# 140511 20-Jan-2005 glebius

Use log() instead of printf(), to reduce flood on console.

MFC after: 1 week


# 138392 05-Dec-2004 glebius

- Use uint16_t to pass argument for NGM_NETFLOW_IFINFO, bump cookie.
- Always check that index number passed from userland
is <= NG_NETFLOW_MAXIFACES. [1]
- Increase NG_NETFLOW_MAXIFACES up to 512. [2]

Noticed by: Roman Palagin [1]
Requested by: Yuri Y. Bushmelev [2]
MFC after: 1 week


# 135400 17-Sep-2004 glebius

- Remove advertising clause from copyright [1]
- Change my email to glebius@FreeBSD.org

Requested by: ru [1]


# 135332 16-Sep-2004 glebius

A netgraph node implementing Netflow version 5.

Supported by: Bestcom ISP, Rinet ISP
Approved by: julian (mentor)