From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id C56DD24D8B for ; Fri, 26 Jul 2024 06:19:10 +0200 (CEST) Received: from mail.posixcafe.org ([45.76.19.58]) by 9front; Fri Jul 26 00:17:50 -0400 2024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posixcafe.org; s=20200506; t=1721967418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5oALrKsPJzJ14d2vp4ME3YkNUMMANAu/pdpLA74SIig=; b=BZ8y7mhqalbRUrCqczQ6WNxUuFWrP5dVynczOwbI5KxnXZQ5CqxmjwYaEBkDiu0LiC9roF H8+A1SQF5DVCFBTvNeyehipBeHnFdwj54KfY23N+VoxrgRrN/0Pt/6Y4MTH8zUdIABM/0G VzrNlkiy1OcwhbGhIPaSjNehe7lghbs= Received: from [192.168.168.200] ( [207.45.82.38]) by mail.posixcafe.org (OpenSMTPD) with ESMTPSA id 88d568b9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <9front@9front.org>; Thu, 25 Jul 2024 23:16:58 -0500 (CDT) Message-ID: <83303850-bd8e-4005-b425-8894b04b9d17@posixcafe.org> Date: Thu, 25 Jul 2024 23:17:49 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: 9front@9front.org References: <59C872D9DD7DD16FBA1D5353DB506C7D@gaff.inri.net> Content-Language: en-US From: Jacob Moody In-Reply-To: <59C872D9DD7DD16FBA1D5353DB506C7D@gaff.inri.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: decentralized hardware software pipelining browser Subject: Re: [9front] WANTED: ip based filtering of incoming connections Reply-To: 9front@9front.org Precedence: bulk On 7/25/24 22:57, sl@stanleylieber.com wrote: >>> Did you verify it was working with just a single ip address or two? I >>> am thinking perhaps you ran in to some arbitrary buffer limit. >> >> even with only one ip address it has no effect. > > the while loop seems useless. if i run this on the command line and never > interrupt it, it just keeps going, and continues to block connections from > this one ip: > > ; aux/dial 'ipmux!vers=4;src=168.235.81.125&255.255.255.255' >/dev/null > > but the original problem i reported still holds true: if i fork it to the > background by placing an & at the end of the line, it exist immediately. > > and you're right, even just running it on the command line and not > interrupting it, with a longer list of ip addresses, it has no effect: > > ; aux/dial 'ipmux!vers=4;src=47.128.0.0&255.252.0.0|52.230.152.0&255.255.255.0|64.249.68.0&255.255.255.0|64.249.79.0&255.255.255.0|64.249.83.0&255.255.255.0|85.208.96.0&255.255.255.0|156.59.198.0&255.255.255.0|168.235.81.125&255.255.255.255' >/dev/null > > it never exits, it just doesn't seem to do anything. > > sl Sorry, my memory betrayed me here and I got all sorts of things wrong. Testing things myself I see the same behavior you see, so forget the rc loop. The issue with dial exiting immediately when backgrounded is because it reads stdin, if you pass dial a -e flag it will ignore stdin and & will work as intended. As for the large lines not working, /sys/src/libc/9sys/dial.c has some hard coded limits and a quick scan makes me think we're capped at Maxstring (128). Sorry, moody