From owner-freebsd-net@FreeBSD.ORG Fri Dec 29 15:48:19 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B2D416A407 for ; Fri, 29 Dec 2006 15:48:19 +0000 (UTC) (envelope-from kmitch@guru.org) Received: from weenix.guru.org (weenix.guru.org [24.199.153.98]) by mx1.freebsd.org (Postfix) with ESMTP id CF70713C457 for ; Fri, 29 Dec 2006 15:48:18 +0000 (UTC) (envelope-from kmitch@guru.org) Received: from localhost (localhost.guru.org [127.0.0.1]) by weenix.guru.org (Postfix) with ESMTP id 4DDAD59926 for ; Fri, 29 Dec 2006 10:48:18 -0500 (EST) Received: from weenix.guru.org ([127.0.0.1]) by localhost (weenix.guru.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 27343-04 for ; Fri, 29 Dec 2006 10:48:18 -0500 (EST) Received: from [161.44.11.166] (ssh-rtp-1.cisco.com [161.44.11.166]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by weenix.guru.org (Postfix) with ESMTP id DF779598A8 for ; Fri, 29 Dec 2006 10:48:17 -0500 (EST) Message-ID: <459538C7.5020704@guru.org> Date: Fri, 29 Dec 2006 10:48:23 -0500 From: Keith Mitchell User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at guru.org Subject: IP_SENDSRCADDR & vlan interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2006 15:48:19 -0000 Hi, I've been trying to get the avahi port working on my system and haven't been able to get it to work. I've done some debugging of the application as well as discussed the problem with the maintainer of avahi. As a result of the debugging, it appears as though avahi works just fine when I just have the physical interfaces on the machine configured. But, when I use a VLAN trunk and the vlan virtual interfaces it does not work. Avahi tries to send out messages on the interfaces with the following code which seems reasonable: memset(&io, 0, sizeof(io)); io.iov_base = AVAHI_DNS_PACKET_DATA(p); io.iov_len = p->size; memset(&msg, 0, sizeof(msg)); msg.msg_name = &sa; msg.msg_namelen = sizeof(sa); msg.msg_iov = &io; msg.msg_iovlen = 1; msg.msg_flags = 0; msg.msg_control = NULL; msg.msg_controllen = 0; if (src_address) { struct in_addr *addr; memset(cmsg_data, 0, sizeof(cmsg_data)); msg.msg_control = cmsg_data; msg.msg_controllen = sizeof(cmsg_data); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); cmsg->cmsg_level = IPPROTO_IP; cmsg->cmsg_type = IP_SENDSRCADDR; addr = (struct in_addr *)CMSG_DATA(cmsg); addr->s_addr = src_address->address; msg.msg_controllen = cmsg->cmsg_len; } return sendmsg_loop(fd, &msg, 0); The eventually call to sendmsg() does return success but nothing ever appears on the wire. I've tried sniffing both on the machine avahi is running on as well as another machine on the network and nothing ever goes out. Is there any known issue with using sendmsg/IP_SENDSRCADDR on the vlan virtual interfaces (as I mentioned above this works fine when using physical interfaces and not the vlan psuedo interfaces)? Thanks. -- Keith Mitchell Email: kmitch@guru.org PGP key available upon request