From: Justin Pettit Date: Tue, 12 May 2009 17:44:36 +0000 (-0700) Subject: Only send NetFlow notifications for IP traffic. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51c9228f964268baac7a3f7ee6d4282b7b9d8e3c;p=openvswitch Only send NetFlow notifications for IP traffic. NetFlow only supports exporting information about IP. We were sending a notification for any flow that expired, which included non-IP packets. This would generate NetFlow messages with nearly all fields set to zero. Now, we only send NetFlow for packets that are IP. (Bug #1256) --- diff --git a/secchan/netflow.c b/secchan/netflow.c index 99285a0e..7c16facb 100644 --- a/secchan/netflow.c +++ b/secchan/netflow.c @@ -178,6 +178,11 @@ netflow_expire(struct netflow *nf, const struct ofexpired *expired) struct netflow_v5_record *nf_rec; struct timeval now; + /* NetFlow only reports on IP packets. */ + if (expired->flow.dl_type != htons(ETH_TYPE_IP)) { + return; + } + time_timeval(&now); if (!nf->packet.size) {