Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2011 14:44:09 GMT
From:      Dmitry Afanasiev <KOT@MATPOCKuH.Ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/155227: netflow.c does not compile with disabled INET6
Message-ID:  <201103031444.p23Ei9PK010226@red.freebsd.org>
Resent-Message-ID: <201103031450.p23EoAKx073354@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155227
>Category:       kern
>Synopsis:       netflow.c does not compile with disabled INET6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 03 14:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Afanasiev
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD orion 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed Mar  2 12:54:04 MSK 2011     root@orion:/usr/obj/usr/src/sys/orion  amd64

>Description:
sys/netgraph/netflow/netflow.c does not compile with disabled INET6:
mno-sse -mno-sse2 -mno-sse3  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -std=iso9899:1999 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/netgraph/netflow/../../../netgraph/netflow/netflow.c
/usr/src/sys/modules/netgraph/netflow/../../../netgraph/netflow/netflow.c: In function 'expire_flow':
/usr/src/sys/modules/netgraph/netflow/../../../netgraph/netflow/netflow.c:286: error: 'struct netflow' has no member named 'zone6'
/usr/src/sys/modules/netgraph/netflow/../../../netgraph/netflow/netflow.c:301: error: 'struct netflow' has no member named 'zone6'
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error

>How-To-Repeat:
1. Update to r219182
2. Disable INET6
3. Build kernel
>Fix:


Patch attached with submission follows:

--- netflow.c.orig	2011-03-03 16:36:00.895086339 +0300
+++ netflow.c	2011-03-03 16:37:32.335079030 +0300
@@ -282,8 +282,10 @@
 			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 +299,10 @@
 
 	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 */


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103031444.p23Ei9PK010226>