From owner-svn-src-head@FreeBSD.ORG Tue Oct 29 17:38:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8FDA71A9; Tue, 29 Oct 2013 17:38:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7CD3727CB; Tue, 29 Oct 2013 17:38:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9THcFP1062347; Tue, 29 Oct 2013 17:38:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9THcEeu062337; Tue, 29 Oct 2013 17:38:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310291738.r9THcEeu062337@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 29 Oct 2013 17:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257349 - in head: contrib/tcpdump sbin/ifconfig usr.bin/netstat usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 17:38:15 -0000 Author: glebius Date: Tue Oct 29 17:38:13 2013 New Revision: 257349 URL: http://svnweb.freebsd.org/changeset/base/257349 Log: Make userland tools honor WITHOUT_PF build option. Tested by: dt71@gmx.com Modified: head/contrib/tcpdump/print-ip.c head/sbin/ifconfig/Makefile head/usr.bin/netstat/Makefile head/usr.bin/netstat/if.c head/usr.bin/netstat/main.c head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Tue Oct 29 17:34:15 2013 (r257348) +++ head/contrib/tcpdump/print-ip.c Tue Oct 29 17:38:13 2013 (r257349) @@ -483,9 +483,11 @@ again: pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); break; +#if defined(HAVE_NET_PFVAR_H) case IPPROTO_PFSYNC: pfsync_ip_print(ipds->cp, ipds->len); break; +#endif default: if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL) Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Tue Oct 29 17:34:15 2013 (r257348) +++ head/sbin/ifconfig/Makefile Tue Oct 29 17:38:13 2013 (r257349) @@ -40,7 +40,9 @@ LDADD+= -lbsdxml -lsbuf SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... +.if ${MK_PF} != "no" SRCS+= ifpfsync.c # pfsync(4) support +.endif SRCS+= ifbridge.c # bridge support SRCS+= iflagg.c # lagg support Modified: head/usr.bin/netstat/Makefile ============================================================================== --- head/usr.bin/netstat/Makefile Tue Oct 29 17:34:15 2013 (r257348) +++ head/usr.bin/netstat/Makefile Tue Oct 29 17:38:13 2013 (r257349) @@ -26,6 +26,10 @@ CFLAGS+=-DINET6 CFLAGS+=-DSDP .endif +.if ${MK_PF} != "no" +CFLAGS+=-DPF +.endif + BINGRP= kmem BINMODE=2555 DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBUTIL} Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Tue Oct 29 17:34:15 2013 (r257348) +++ head/usr.bin/netstat/if.c Tue Oct 29 17:38:13 2013 (r257349) @@ -48,13 +48,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include #include #include #include +#ifdef PF +#include +#include +#endif #include #include @@ -80,6 +82,7 @@ static void sidewaysintpr(int); static char addr_buf[NI_MAXHOST]; /* for getnameinfo() */ #endif +#ifdef PF static const char* pfsyncacts[] = { /* PFSYNC_ACT_CLR */ "clear all request", /* PFSYNC_ACT_INS */ "state insert", @@ -154,6 +157,7 @@ pfsync_stats(u_long off, const char *nam p(pfsyncs_oerrors, "\t\t%ju send error%s\n"); #undef p } +#endif /* PF */ /* * Display a formatted value, or a '-' in the same space. Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Tue Oct 29 17:34:15 2013 (r257348) +++ head/usr.bin/netstat/main.c Tue Oct 29 17:38:13 2013 (r257349) @@ -214,8 +214,10 @@ struct protox { pim_stats, NULL, "pim", 1, IPPROTO_PIM }, { -1, N_CARPSTAT, 1, NULL, carp_stats, NULL, "carp", 1, 0 }, +#ifdef PF { -1, N_PFSYNCSTAT, 1, NULL, pfsync_stats, NULL, "pfsync", 1, 0 }, +#endif { -1, N_ARPSTAT, 1, NULL, arp_stats, NULL, "arp", 1, 0 }, { -1, -1, 0, NULL, Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Tue Oct 29 17:34:15 2013 (r257348) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Tue Oct 29 17:38:13 2013 (r257349) @@ -89,7 +89,6 @@ SRCS= addrtoname.c \ print-olsr.c \ print-ospf.c \ print-otv.c \ - print-pfsync.c \ print-pgm.c \ print-pim.c \ print-ppi.c \ @@ -171,7 +170,8 @@ CFLAGS+= -DHAVE_LIBCRYPTO -DHAVE_OPENSSL .endif .if ${MK_PF} != "no" -SRCS+= print-pflog.c +SRCS+= print-pflog.c \ + print-pfsync.c CFLAGS+= -DHAVE_NET_PFVAR_H .endif