From owner-freebsd-stable@FreeBSD.ORG Thu Aug 17 21:05:03 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB5BD16A4DD for ; Thu, 17 Aug 2006 21:05:03 +0000 (UTC) (envelope-from Stephen.Clark@seclark.us) Received: from smtpout08-04.prod.mesa1.secureserver.net (smtpout08-04.prod.mesa1.secureserver.net [64.202.165.12]) by mx1.FreeBSD.org (Postfix) with SMTP id 136D943D45 for ; Thu, 17 Aug 2006 21:05:02 +0000 (GMT) (envelope-from Stephen.Clark@seclark.us) Received: (qmail 18667 invoked from network); 17 Aug 2006 21:05:02 -0000 Received: from unknown (24.144.77.138) by smtpout08-04.prod.mesa1.secureserver.net (64.202.165.12) with ESMTP; 17 Aug 2006 21:05:02 -0000 Message-ID: <44E4D9FD.7050003@seclark.us> Date: Thu, 17 Aug 2006 17:05:01 -0400 From: Stephen Clark User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22smp i686; en-US; m18) Gecko/20010110 Netscape6/6.5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen.Clark@seclark.us References: <44E47ED5.2020504@seclark.us> In-Reply-To: <44E47ED5.2020504@seclark.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: freebsd 6.1 SIOCGIFMEDIA on rl0 no longer works X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stephen.Clark@seclark.us List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 21:05:03 -0000 Update: We reverted to freevrrpd 0.8.7 which seems to work. Steve Stephen Clark wrote: >Hello list, > >We have been running 4.9 and using freevrrpd 0.9.3, which worked great, >- the latest in the ports tree. We are switching >to 6.1 released and we now get the the following error from freevrrpd: >freevrrpd[6241]: cannot do ioctl, intertface is faulty: Device not >configured > >This is a bogus message since the interface is configured up and running. >What changed in 6.1 to cause this? > >The message comes from the following code in freevrrpd: > >int vrrp_moncircuit_interface_status(int sd, char *if_name) >{ > struct ifmediareq ifmr; > > if (sd < 0) { > syslog(LOG_ERR, "socket descriptor must be != -1"); > return -1; > } > bzero(&ifmr, sizeof(ifmr)); > strncpy(ifmr.ifm_name, if_name, sizeof(ifmr.ifm_name)); > > if (ioctl(sd, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { > if (errno == EINVAL) { > syslog(LOG_ERR, "your NIC doesn't support SIOCGIFMEDIA >ioctl: %s", strerror(errno)); > return -3; > } > else > syslog(LOG_ERR, "cannot do ioctl, intertface is faulty: %s", >strerror(errno)); > return -2; > } > > if (ifmr.ifm_status & IFM_AVALID) { > if (ifmr.ifm_status & IFM_ACTIVE) > return 1; > else > return 0; > } > > /* Interface has no carrier cable problem ? */ > return 0; >} > >Any help on this would be greatly appreciated. > >Thanks, >Steve > > > -- "They that give up essential liberty to obtain temporary safety, deserve neither liberty nor safety." (Ben Franklin) "The course of history shows that as a government grows, liberty decreases." (Thomas Jefferson)