From owner-svn-src-all@FreeBSD.ORG Sat Nov 8 14:41:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BF6F75B; Sat, 8 Nov 2014 14:41:34 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2E7584D; Sat, 8 Nov 2014 14:41:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sA8EfXaB053156; Sat, 8 Nov 2014 14:41:33 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sA8EfXAZ053154; Sat, 8 Nov 2014 14:41:33 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201411081441.sA8EfXAZ053154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 8 Nov 2014 14:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274289 - in head/sys: modules/if_gre net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2014 14:41:34 -0000 Author: bz Date: Sat Nov 8 14:41:32 2014 New Revision: 274289 URL: https://svnweb.freebsd.org/changeset/base/274289 Log: After r274246 make the tree compile again. gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. Modified: head/sys/modules/if_gre/Makefile head/sys/net/if_gre.c Modified: head/sys/modules/if_gre/Makefile ============================================================================== --- head/sys/modules/if_gre/Makefile Sat Nov 8 13:49:59 2014 (r274288) +++ head/sys/modules/if_gre/Makefile Sat Nov 8 14:41:32 2014 (r274289) @@ -6,10 +6,24 @@ KMOD= if_gre SRCS= if_gre.c opt_inet.h opt_inet6.h +.if defined(KERNBUILDDIR) +OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo +.if empty(OPT_INET) +MK_INET_SUPPORT=no +.endif +.endif + .if ${MK_INET_SUPPORT} != "no" SRCS+= ip_gre.c .endif +.if defined(KERNBUILDDIR) +OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h; echo +.if empty(OPT_INET6) +MK_INET6_SUPPORT=no +.endif +.endif + .if ${MK_INET6_SUPPORT} != "no" SRCS+= ip6_gre.c .endif Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Sat Nov 8 13:49:59 2014 (r274288) +++ head/sys/net/if_gre.c Sat Nov 8 14:41:32 2014 (r274289) @@ -632,6 +632,7 @@ gre_set_tunnel(struct ifnet *ifp, struct gre_updatehdr(sc); GRE_WUNLOCK(sc); + error = 0; switch (src->sa_family) { #ifdef INET case AF_INET: @@ -865,6 +866,8 @@ gre_transmit(struct ifnet *ifp, struct m want_seq = (sc->gre_options & GRE_ENABLE_SEQ) != 0; if (want_seq) oseq = sc->gre_oseq++; /* XXX */ + else + oseq = 0; /* Make compiler happy. */ want_csum = (sc->gre_options & GRE_ENABLE_CSUM) != 0; M_SETFIB(m, sc->gre_fibnum); M_PREPEND(m, hlen, M_NOWAIT);