From owner-p4-projects@FreeBSD.ORG Tue Jul 10 09:40:48 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4A6416A421; Tue, 10 Jul 2007 09:40:48 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2347A16A400 for ; Tue, 10 Jul 2007 09:40:48 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 12CA313C448 for ; Tue, 10 Jul 2007 09:40:48 +0000 (UTC) (envelope-from mharvan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l6A9eliF040233 for ; Tue, 10 Jul 2007 09:40:47 GMT (envelope-from mharvan@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l6A9el1D040230 for perforce@freebsd.org; Tue, 10 Jul 2007 09:40:47 GMT (envelope-from mharvan@FreeBSD.org) Date: Tue, 10 Jul 2007 09:40:47 GMT Message-Id: <200707100940.l6A9el1D040230@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mharvan@FreeBSD.org using -f From: Matus Harvan To: Perforce Change Reviews Cc: Subject: PERFORCE change 123260 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2007 09:40:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=123260 Change 123260 by mharvan@mharvan_twoflower on 2007/07/10 09:39:53 use #ifdef to run the proper ifconfig commands on FreeBSD and Linux Affected files ... .. //depot/projects/soc2007/mharvan-mtund/mtund.src/tunneld.c#7 edit Differences ... ==== //depot/projects/soc2007/mharvan-mtund/mtund.src/tunneld.c#7 (text+ko) ==== @@ -418,13 +418,19 @@ /* setup the tun interface */ if (server) { - system("ifconfig tun0 mtu 1400 192.168.0.1 192.168.0.2"); + #ifdef __FreeBSD__ + ssystem("ifconfig tun0 mtu 1400 192.168.0.1 192.168.0.2"); + #endif + } else { /* FeeBSD */ - system("ifconfig tun0 mtu 1400 192.168.0.2 192.168.0.1"); + #ifdef __FreeBSD__ + ssystem("ifconfig tun0 mtu 1400 192.168.0.2 192.168.0.1"); + #else /* Linux */ - //system("ifconfig tun0 mtu 1400 192.168.0.2"); - //system("route add 192.168.0.1 tun0"); + ssystem("ifconfig tun0 mtu 1400 192.168.0.2"); + ssystem("route add 192.168.0.1 tun0"); + #endif } signal(SIGHUP, sigcb);