From nobody Mon Aug 1 15:15:36 2022 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LxMBf1Sz7z4Y2Z0 for ; Mon, 1 Aug 2022 15:15:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LxMBf0D8Mz3Lq5 for ; Mon, 1 Aug 2022 15:15:38 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LxMBd6P5XzdMk for ; Mon, 1 Aug 2022 15:15:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 271FFbdI073122 for ; Mon, 1 Aug 2022 15:15:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 271FFbNp073121 for net@FreeBSD.org; Mon, 1 Aug 2022 15:15:37 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 237973] pf: implement egress keyword to simplify rules across different hardware Date: Mon, 01 Aug 2022 15:15:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: feature, needs-patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: melifaro@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659366938; 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=JM27WQIk0K57M1fTgb0mBj4MMk+7XqzDNogdAQXfMhI=; b=AXVfXfQ1ipxDO1LLXdPd4f3PXX+j+tSi87c93qHoi8GFNGg3Q7i8st0PeAGimD9UXNgN3K fBPQEYoZmUfMZgbAQrq3UdW51zsTm2dF6Imfk3tU6m1gXNLgqK9Hh3Cv9lRuuZVFw3IkRy iRqdhpgHBARTYDrNVRpM0rL7p479FDitlGy+wKyPNgb2D6ZAMZ9/JXyXjVgNYNmUTWWzg4 sssL1bTKCk3+R5tO3D3ViOphK4l4KLLgrd1du0y5yRVx/plsJ33igE4h7mWu4ImtDD+521 EtVYToo0RzLwcA7Xd8xu006bMeywXOWiUdQVv7LGtZFZI8co8+MGMy4TvGotVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659366938; a=rsa-sha256; cv=none; b=tDwajWHEMrsWx6M5AS+s4GjMGH/BaD1n6Ee8JT/ILvNwZPGipOs+DFVcFVSF6mpwjNbl/0 q+IeZKKDYm6dWAdyGcDorwiXNhk2qwXsF1GgrHrYrNzFC6TWyI/kx4A6HCsqwbtyA+8J9l HMqdfqXw22rtqlhC5pTrlddHNw+QnWZhT3eLE/dCPJhzaXtmq1f9p+cwZgNVsPE9ri6oyd mv+Tl45Z7SMxu6zi1D/Do9V1t9uLH0TU9umAfmkUzbWDXZirGHKWZ04olefhh8IjJq+Qiz 6TW8er0S/IBt5CSa6qlo1QjtdDIuIxVXMcKhxZrA5RnKwEgcMjTASwAFLJnmlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237973 --- Comment #19 from Alexander V. Chernikov --- (In reply to Goran Meki=C4=87 from comment #18) The rest is the prefix information, in sockaddr form. Basically, rtm_addrs contains a bitmask of sockaddrs available, and these remaining bytes are 4/8-bytes aligned 'struct sockaddr_in[6]', representing dst,netmask and gateway. You can look at the example parsing code here: https://github.com/freebsd/freebsd-src/blob/main/sys/net/rtsock.c#L1311 Interface is present in rtm_ifindex (and you can use if_indextoname()). rts= ock sockets are bound the the fib of the process at the time of socket creation= , so the fib is the process fib. If you need to monitor more than one fib, you c= an either create multiple processes or create multiple rtsock sockets, using setfib() calls prior to calling socket(). --=20 You are receiving this mail because: You are the assignee for the bug.=