From owner-freebsd-net@FreeBSD.ORG Thu Dec 16 04:49:24 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 307C616A4CE for ; Thu, 16 Dec 2004 04:49:24 +0000 (GMT) Received: from kazna.ru (ns.kazna.ru [195.151.219.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EEF343D1F for ; Thu, 16 Dec 2004 04:49:23 +0000 (GMT) (envelope-from dvoinikov@kazna.ru) Received: from ns (localhost.localdomain [127.0.0.1]) by kazna.ru (Postfix) with SMTP id F376250291; Thu, 16 Dec 2004 09:49:20 +0500 (YEKT) Received: from yukon.skazna.local (host33.kazna.ru [195.151.219.33]) by kazna.ru (Postfix) with ESMTP id A0F675028C for ; Thu, 16 Dec 2004 09:49:20 +0500 (YEKT) Date: Thu, 16 Dec 2004 09:49:17 +0500 From: =?ISO-8859-1?B?xOzo8vDo6SDE4u7p7ejq7uI=?= X-Priority: 3 (Normal) Message-ID: <1716213283.20041216094917@kazna.ru> To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SpamTest-Info: Profile: Formal (174/041214) X-SpamTest-Info: Profile: Detect Hard (4/030526) X-SpamTest-Info: Profile: SysLog X-SpamTest-Info: Profile: Archiving/Rejecting (2/030321) X-SpamTest-Status: Not detected X-SpamTest-Version: SMTP-Filter Version 2.0.0 [0124], KAS/Release Subject: Divert sockets no longer behave like connected (SS_ISCONNECTED is removed from so->so_state) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: =?ISO-8859-1?B?xOzo8vDo6SDE4u7p7ejq7uI=?= List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2004 04:49:24 -0000 Hello, I'm having this application (VPN daemon) which uses divert sockets for sending stuff http://www.targeted.org/nest/ It worked fine under 5.3-RELEASE but broke after recent upgrade to FreeBSD 5.3-STABLE. An attempt to send() via divert socket now returns EDESTADDRREQ "Destination address required". Digging up the CVS revealed this: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/ip_divert.c Quote: > Revision 1.98.2.1 / (download) - annotate - [select for diffs], Tue Nov 23 15:30:02 2004 UTC (3 weeks ago) by glebius > Branch: RELENG_5 > - Since divert protocol is not connection oriented, remove SS_ISCONNECTED flag > from divert sockets. Also relevant is this message by Gleb Smirnoff: http://www.freebsd.org/cgi/getmsg.cgi?fetch=50544+0+/usr/local/www/db/text/2004/freebsd-net/20041121.freebsd-net Quote: > So, the real change suggested is to remove SS_ISCONNECTED from so->so_state. All > other changes are its logical consequences. > What was idea of that SS_ISCONNECTED flag always set? I can't find any problems we > can get by removing this code. Well, I'm having one - my application stopped working. Also, quote from man divert: > Packets are written as either incom- > ing or outgoing: if write(2) or send(2) is used to deliver the packet > ... skip ... > then the packet is treated as if it were outgoing My case exactly, but this no longer holds. What am I supposed to do now ? Modify my application ? Actually I already did that, by switching to sendto(), but just wanted to make sure this divert sockets semantics change is intented and not spontaneous. Sincerely, Dmitry Dvoinikov http://www.targeted.org/