From hashiz@stenmark.meridiani.jp  Wed Mar 19 09:48:48 2014
Return-Path: <hashiz@stenmark.meridiani.jp>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 7DE8A59A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2014 09:48:48 +0000 (UTC)
Received: from tomba.meridiani.jp (7c2944dd.i-revonet.jp [124.41.68.221])
	by mx1.freebsd.org (Postfix) with ESMTP id 50B0ADA1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2014 09:48:47 +0000 (UTC)
Received: from stenmark.meridiani.jp (stenmark.meridiani.jp [192.168.1.2])
	by tomba.meridiani.jp (Postfix) with ESMTP id 528191DEEA6
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Mar 2014 18:48:39 +0900 (JST)
Received: by stenmark.meridiani.jp (Postfix, from userid 1001)
	id 3F8F24AB6D5; Wed, 19 Mar 2014 18:48:39 +0900 (JST)
Message-Id: <20140319094839.3F8F24AB6D5@stenmark.meridiani.jp>
Date: Wed, 19 Mar 2014 18:48:39 +0900 (JST)
From: HASHI Hiroaki <hashiz@stenmark.meridiani.jp>
Reply-To: HASHI Hiroaki <hashiz@stenmark.meridiani.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: stable/10@263086 breaks pf's ioctl ABI and missing header file in /usr/include
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         187729
>Category:       kern
>Synopsis:       stable/10@263086 breaks pf's ioctl ABI and missing header file in /usr/include [regression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 19 09:50:00 UTC 2014
>Closed-Date:    Wed Apr 16 07:18:30 UTC 2014
>Last-Modified:  Wed Apr 16 07:20:00 UTC 2014
>Originator:     HASHI Hiroaki
>Release:        FreeBSD 10.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD stenmark.meridiani.jp 10.0-STABLE FreeBSD 10.0-STABLE #6 r263322: Wed Mar 19 13:57:19 JST 2014 hashiz@stenmark.meridiani.jp:/usr/obj/usr/src/sys/STENMARK amd64


	userland: net/miniupnpd, pfctl and more.
>Description:
	1) stable/10 r263086 changes break pf's ioctl ABI.
	so userland programs must rebuild.
	2) but cannot compile cannot compile for missing header files.
>How-To-Repeat:
        upgrade system to stable/10 r263086
	1) net/miniupnpd cannot work with error.
        Mar 19 16:00:30 tomba miniupnpd[2103]: ioctl(dev, DIOCGETRULES, ...): Operation not supported by device
	Mar 19 16:00:30 tomba miniupnpd[2103]: ioctl(dev, DIOCCHANGERULE, ...) PF_CHANGE_GET_TICKET: Operati
on not supported by device

	2) net/miniupnpd cannot re-compile
	portupgrade -fp miniupnpd
	In file included from bsd/getifstats.c:20:
	/usr/include/net/pfvar.h:45:10: fatal error: 'netpfil/pf/pf.h' file not found
	#include <netpfil/pf/pf.h>
         ^
	1 error generated.
	*** Error code 1
        
>Fix:
	revert this change.
	ABI change is not suitable for stable branch.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 16 01:21:06 UTC 2014 
Responsible-Changed-Why:  
over to committer of 263086. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187729 
State-Changed-From-To: open->closed 
State-Changed-By: glebius 
State-Changed-When: Wed Apr 16 07:03:13 UTC 2014 
State-Changed-Why:  
Sorry, I can't backout 263086 because it fixes a critical bug. 
The ABI instability of pf is a known bug, but it requires 
a lot of time resources to be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187729 

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: HASHI Hiroaki <hashiz@stenmark.meridiani.jp>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/187729: stable/10@263086 breaks pf's ioctl ABI and missing
 header file in /usr/include [regression]
Date: Wed, 16 Apr 2014 11:17:36 +0400

   Hashi-san,
 
 the r263086 fixed a critical bug in pf. 
 
 Unfortunately, pf is written in a bad fashion, when same structures are
 used for both ioctls and for kernel representation of pf entities.
 Again unfortunately, in my massive pf work, that I did in 2012, I didn't
 have enough time and funding to fix that problem. So, in stable/10 pf
 went without a well designed API/ABI. That means, that if a critical
 bug needs to be fixed, we might need to break ABI.
 
 Regarding the header file. The file is present in recent stable/10.
 
 -- 
 Totus tuus, Glebius.
>Unformatted:
