From owner-freebsd-pf@freebsd.org Fri Mar 16 09:33:17 2018 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCEDAF5F02A for ; Fri, 16 Mar 2018 09:33:16 +0000 (UTC) (envelope-from Steven@stream-technologies.com) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40061.outbound.protection.outlook.com [40.107.4.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CCA975413; Fri, 16 Mar 2018 09:33:15 +0000 (UTC) (envelope-from Steven@stream-technologies.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=streamtechnologiesuk.onmicrosoft.com; s=selector1-streamtechnologies-com01e; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=5yNYOpjahYEtp2MO0DX8HoLJZhW/9uWROPnaDiNvdXk=; b=gRrcxViWNLgWB/boxxGg/XxXNJDrU8jQMv+MWqwXhYEcagtYhUS6mboXJbvU3rVJA24qAfvGRluP9w8dYxQBO3XBdebglzz6lXNvjB0WAAeHPfECAukyJUwhrsgQVLXlwmnycEz5kwaBv9lIR9LQ//LyJuK16mCtT9lvgJU2hgQ= Received: from AM4PR07MB3186.eurprd07.prod.outlook.com (10.171.188.151) by AM4PR07MB1347.eurprd07.prod.outlook.com (10.164.82.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.6; Fri, 16 Mar 2018 09:33:12 +0000 Received: from AM4PR07MB3186.eurprd07.prod.outlook.com ([fe80::d8fc:407:e8c0:e56c]) by AM4PR07MB3186.eurprd07.prod.outlook.com ([fe80::d8fc:407:e8c0:e56c%6]) with mapi id 15.20.0609.006; Fri, 16 Mar 2018 09:33:12 +0000 From: Steven Crangle To: Kristof Provost CC: "freebsd-pf@freebsd.org" , "eri@freebsd.org" Subject: Re: Required modification for round robin napt with ip address prefixes Thread-Topic: Required modification for round robin napt with ip address prefixes Thread-Index: AQHTu7fDX4eUYNklBkma7Tav5LLNJKPRtmCAgADkAvE= Date: Fri, 16 Mar 2018 09:33:12 +0000 Message-ID: References: , <8AE55F12-E53E-40BE-A99A-CB8D9B306806@sigsegv.be> In-Reply-To: <8AE55F12-E53E-40BE-A99A-CB8D9B306806@sigsegv.be> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steven@stream-technologies.com; x-originating-ip: [212.250.79.109] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR07MB1347; 7:HLKO75pk4MizI0uVARgc3Jw3DeyWwb0fX3BIjtmkaiITtlrhzzslLPbhpK8cFfJFrGwe8QKdt3NUo2srZNlK+/qew/+VSyNVA18ES7j0ciI4rb5VJccuLF3HLp2Rbq/pJTApWhDQZgVm5fUBCXkbb2UNbRZMZmrQruJbgfnOOryFYo67OQGDxplww5ePV4kyPsV1jJo+MsEbJAjTf8N+6BXkoH0ivoLdldA22EObc52Mz7UeMYRQyZ/RZ/eT5GnR x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b9cc3e3a-fcab-4771-412f-08d58b20f002 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR07MB1347; x-ms-traffictypediagnostic: AM4PR07MB1347: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(155532106045638); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231221)(944501244)(52105095)(93006095)(93001095)(6041310)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR07MB1347; BCL:0; PCL:0; RULEID:; SRVR:AM4PR07MB1347; x-forefront-prvs: 0613912E23 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39380400002)(396003)(376002)(39840400004)(189003)(199004)(66066001)(19627405001)(53936002)(25786009)(9686003)(105586002)(8936002)(6246003)(7696005)(68736007)(76176011)(33656002)(106356001)(2900100001)(2950100002)(4326008)(5660300001)(74316002)(478600001)(6916009)(7736002)(3280700002)(72206003)(6606003)(6436002)(6116002)(3846002)(14454004)(81166006)(81156014)(8676002)(55016002)(5250100002)(229853002)(54896002)(316002)(97736004)(26005)(2906002)(53546011)(86362001)(80792005)(6506007)(102836004)(54906003)(3660700001)(186003)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR07MB1347; H:AM4PR07MB3186.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: stream-technologies.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: blU+Nwo2uAzq25o3kU/VV69DTmWpZoUPd427b7c4vWqyHSEWSFswiwAF8XbEwu95BszMbvqJeVdsWHyYErKHtmRpv7J6qs26HK76N/7OTrifSL9seLkd6OC1uXmFiFhaRjIy9tl78bxmY11fPzzOL6zQkj63jfEXvPXt6y8/fCm7Qmq4zmXfpL4F/3e7cvFCCkGTTjp3d81G0x5cuF7fmmtq1YHloFwQwV6s0m3+ZvhXkmotikLPcP6biLZoLJySp+EnvRJZFYtM5grIUQj9TwNE+Ra04REFJT3LqqRIWQGKiJl5IkCWAKGakngzud44xRL0+cZDXywKvO40XlTw8Q== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: stream-technologies.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9cc3e3a-fcab-4771-412f-08d58b20f002 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2018 09:33:12.3136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 720fa073-5781-43bf-bc14-7bef2603ed21 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB1347 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2018 09:33:17 -0000 Hi, Thanks to both of you for your responses. I'm currently working on a reduce= d test case that will hopefully reproduce the issue. I'll also reach out to glebius@ too, as it would be great to get a bit more= insight into how to approach a fix for the issue. Hopefully they can point me in the right direction and I can work on a fix! Regards Steven ________________________________ From: Kristof Provost Sent: 15 March 2018 19:50:45 To: Steven Crangle Cc: freebsd-pf@freebsd.org Subject: Re: Required modification for round robin napt with ip address pre= fixes On 14 Mar 2018, at 18:30, Steven Crangle wrote: > I was looking for some advice on the type of locking required to stop > a box panicking that utilises both napt and ip address prefixes. > > My colleague made a post a while ago, and we ended up getting > distracted fixing other panics that showed up. But we've now returned > to try and figure out the issue. > > > The relevant code is in pf_lb.c : 424 > I=92d recommend talking to glebius@. He did the locking code and wrote the comment block discussing the locking choices around PF_POOL_ROUNDROBIN. I suspect it=92s a bit more complicated that a straightforward PF_RULES_WLOCK() would fix. The locking model for pf is pretty complex. I=92ve not had the time to really dig into this, so I can=92t give more advice right now. Regards, Kristof