svn commit: r219229 - head/sys/netgraph/netflow

Bjoern A. Zeeb bz at FreeBSD.org
Thu Mar 3 16:16:49 UTC 2011


Author: bz
Date: Thu Mar  3 16:16:49 2011
New Revision: 219229
URL: http://svn.freebsd.org/changeset/base/219229

Log:
  Unbreak the build for no options INET6.
  
  PR:		kern/155227
  Submitted by:	Dmitry Afanasiev (KOT MATPOCKuH.Ru)

Modified:
  head/sys/netgraph/netflow/netflow.c
  head/sys/netgraph/netflow/netflow_v9.c

Modified: head/sys/netgraph/netflow/netflow.c
==============================================================================
--- head/sys/netgraph/netflow/netflow.c	Thu Mar  3 15:27:06 2011	(r219228)
+++ head/sys/netgraph/netflow/netflow.c	Thu Mar  3 16:16:49 2011	(r219229)
@@ -99,7 +99,9 @@ static int export_add(item_p, struct flo
 static int export_send(priv_p, fib_export_p, item_p, int);
 
 static int hash_insert(priv_p, struct flow_hash_entry *, struct flow_rec *, int, uint8_t);
+#ifdef INET6
 static int hash6_insert(priv_p, struct flow6_hash_entry *, struct flow6_rec *, int, uint8_t);
+#endif
 
 static __inline void expire_flow(priv_p, fib_export_p, struct flow_entry *, int);
 
@@ -282,8 +284,10 @@ expire_flow(priv_p priv, fib_export_p fe
 			atomic_add_32(&priv->info.nfinfo_export9_failed, 1);
 			if (version == IPVERSION)
 				uma_zfree_arg(priv->zone, fle, priv);
+#ifdef INET6
 			else if (version == IP6VERSION)
 				uma_zfree_arg(priv->zone6, fle, priv);
+#endif
 			else
 				panic("ng_netflow: Unknown IP proto: %d", version);
 			return;
@@ -297,8 +301,10 @@ expire_flow(priv_p priv, fib_export_p fe
 
 	if (version == IPVERSION)
 		uma_zfree_arg(priv->zone, fle, priv);
+#ifdef INET6
 	else if (version == IP6VERSION)
 		uma_zfree_arg(priv->zone6, fle, priv);
+#endif
 }
 
 /* Get a snapshot of node statistics */

Modified: head/sys/netgraph/netflow/netflow_v9.c
==============================================================================
--- head/sys/netgraph/netflow/netflow_v9.c	Thu Mar  3 15:27:06 2011	(r219228)
+++ head/sys/netgraph/netflow/netflow_v9.c	Thu Mar  3 16:16:49 2011	(r219229)
@@ -256,7 +256,9 @@ export9_add(item_p item, struct netflow_
 
 	/* Prepare flow record */
 	fed = (struct flow_entry_data *)&fle->f;
+#ifdef INET6
 	fed6 = (struct flow6_entry_data *)&fle->f;
+#endif
 	/* We can use flow_type field since fle6 offset is equal to fle */
 	flow_type = fed->r.flow_type;
 


More information about the svn-src-head mailing list