From owner-freebsd-arch@freebsd.org Thu Mar 5 14:42:21 2020 Return-Path: Delivered-To: freebsd-arch@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C382226B5F3 for ; Thu, 5 Mar 2020 14:42:21 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501o.mail.yandex.net (forward501o.mail.yandex.net [37.140.190.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YD3v1GhVz4YLK for ; Thu, 5 Mar 2020 14:42:18 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback10q.mail.yandex.net (mxback10q.mail.yandex.net [IPv6:2a02:6b8:c0e:1b4:0:640:b6ef:cb3]) by forward501o.mail.yandex.net (Yandex) with ESMTP id 339761E8037A; Thu, 5 Mar 2020 17:42:15 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback10q.mail.yandex.net (mxback/Yandex) with ESMTP id fDBBOOCanU-gE9mxaed; Thu, 05 Mar 2020 17:42:14 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1583419334; bh=GCVnjsNC4tVUf9Tp7Pdrmm+p5LH9kxZo2lNnTKXrvqo=; h=References:Date:Message-Id:Subject:In-Reply-To:To:From; b=XCnNGVH6qORRy4YRLVpf+oi0BQKWk20eWnOU41WSDsIVkiZm8mPFD8HpSNctrS4gM VeisjxvYfWcUNuBsYeCp+OY3zL4PQ7eklLwt/2yKaGzQr6evdPli5S86TWEiTG3n29 mXJsQklKCjOFr4WY2Ta6CZUE2kV7ntd7AXtiUkkY= Received: by vla1-19f0dde8b070.qloud-c.yandex.net with HTTP; Thu, 05 Mar 2020 17:42:14 +0300 From: Alexander V. Chernikov To: Nick Hibma , FreeBSD Architecture Mailing List In-Reply-To: References: Subject: Re: change divert socket to use a sockaddr_div struct MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 05 Mar 2020 14:42:14 +0000 Message-Id: <8181583419268@vla1-c477e3898c96.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Rspamd-Queue-Id: 48YD3v1GhVz4YLK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=XCnNGVH6; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 37.140.190.203 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-4.34 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:37.140.128.0/18]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ipfw.ru]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ipfw.ru:+]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-1.74)[ipnet: 37.140.128.0/18(-4.89), asn: 13238(-3.84), country: RU(0.01)]; RCVD_IN_DNSWL_LOW(-0.10)[203.190.140.37.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13238, ipnet:37.140.128.0/18, country:RU]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2020 14:42:21 -0000 27.02.2020, 09:16, "Nick Hibma" : > Folks, Hi Nick, > > We would like to use FIBs for routing, but currently cannot because the FIB is lost when the packet goes through a divert socket for processing. I've attached a patch that should fix this situation, and while there fix the limit of 7 characters for the interface name which some people got bitten by. This fix was suggested some time ago by Warner Losh. It looks like the patch got stripped by the mailing list. Could you please publish it on https://reviews.freebsd.org ? > > I've changed the sockaddr_in to a sockaddr_di struct to pass the FIB number and the complete interface, and other info in and out. But this seems to lead to memory corruption. Perhaps someone who knows the API can tell me where I should look for memory corruption issues, because this patch causes random crashes. I assume it's because of overwriting random memory. > > Thanks in advance. > > Nick Hibma > nick@van-laarhoven.org > > -- Open Source: We stand on the shoulders of giants. > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"