From owner-freebsd-bugs Mon Jun 14 14:30: 3 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 14E81153FC for ; Mon, 14 Jun 1999 14:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA05996; Mon, 14 Jun 1999 14:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from matrix.42.org (matrix.42.org [194.246.250.200]) by hub.freebsd.org (Postfix) with ESMTP id ECFB2154F3 for ; Mon, 14 Jun 1999 14:26:03 -0700 (PDT) (envelope-from sec@42.org) Received: from btl.42.org (btl.42.org [194.246.250.193]) by matrix.42.org (8.8.8/8.8.5) with ESMTP id XAA25170 for (sender ); Mon, 14 Jun 1999 23:26:01 +0200 (CEST) Received: (from root@localhost) by btl.42.org (8.9.3/8.9.1) id XAA00816; Mon, 14 Jun 1999 23:26:02 +0200 (CEST) (envelope-from sec) Message-Id: <199906142126.XAA00816@btl.42.org> Date: Mon, 14 Jun 1999 23:26:02 +0200 (CEST) From: Stefan Zehl Reply-To: sec@42.org To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12216: rwhod triggers dial on demand (patch) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12216 >Category: bin >Synopsis: rwhod triggers dial on demand (patch) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jun 14 14:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Stefan Zehl >Release: FreeBSD 3.2-STABLE i386 >Organization: >Environment: A box wich connects a lan to the internet via some point to point link. >Description: rwho broadcasts its uptime on all interfaces which match either IFF_BROADCAST or IFF_POINTOPOINT. On a box with i4b and dial on demand, the packets sent via the isp0 interface trigger dialouts. >How-To-Repeat: configure point to point interface up and for dial on demand, then start rwhod. >Fix: Attached is a patch which adds the '-p' option to disable sending packets on pointopoint links. While creating the patch, I found out that the variables 'insecure_mode' and 'quiet_mode' are both not initialized to 0. Shouldn't this be added ? --- rwhod.c.orig Mon Jun 14 23:14:51 1999 +++ rwhod.c Mon Jun 14 23:14:51 1999 @@ -117,6 +117,7 @@ int insecure_mode; int quiet_mode; +int dialup_mode = 0; int multicast_mode = NO_MULTICAST; int multicast_scope; struct sockaddr_in multicast_addr = { sizeof multicast_addr, AF_INET }; @@ -200,6 +201,8 @@ insecure_mode = 1; else if (strcmp(*argv, "-l") == 0) quiet_mode = 1; + else if (strcmp(*argv, "-p") == 0) + dialup_mode = 1; else usage(); argv++, argc--; @@ -604,7 +607,8 @@ if ((flags & IFF_UP) == 0 || (flags & (((multicast_mode == PER_INTERFACE_MULTICAST) ? IFF_MULTICAST : 0) | - IFF_BROADCAST|IFF_POINTOPOINT)) == 0) + IFF_BROADCAST | + (dialup_mode?0:IFF_POINTOPOINT))) == 0) continue; if (ifm->ifm_type != RTM_NEWADDR) quit("out of sync parsing NET_RT_IFLIST"); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message