NetBSD Problem Report #49776
From www@NetBSD.org Sun Mar 22 22:40:02 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D6189A654B
for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Mar 2015 22:40:01 +0000 (UTC)
Message-Id: <20150322224000.C1463A65B7@mollari.NetBSD.org>
Date: Sun, 22 Mar 2015 22:40:00 +0000 (UTC)
From: szptvlfn@a-net.email.ne.jp
Reply-To: szptvlfn@a-net.email.ne.jp
To: gnats-bugs@NetBSD.org
Subject: npf at boot-time
X-Send-Pr-Version: www-1.0
>Number: 49776
>Category: bin
>Synopsis: npf at boot-time
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 22 22:45:00 +0000 2015
>Closed-Date: Sat Jan 19 21:45:08 +0000 2019
>Last-Modified: Sat Jan 19 21:45:08 +0000 2019
>Originator: Ryosuke Moro
>Release:
>Organization:
curiosity cat
>Environment:
NetBSD tensor.sct.iutt 7.99.7 NetBSD 7.99.7 (amnesia) #6: Sun Mar 22 13:31:59
JST 2015 szptvlfn@tensor.sct.iutt:/usr/obj/sys/arch/i386/compile/amnesia i386
>Description:
Set up your conf file,
whatever test to confirm npf working correctly,
if you have in your conf file:
5 $wired_if = "re0"
6 $wired_v4 = { inet4(re0) }
7 $wired_v6 = { inet6(re0) }
# 5,6,7 is line number.
get this error message at (re)boot-time:
/etc/npf.conf:6:24: no addresses matched for interface 're0' near ')'
then run npf without your conf file.
>How-To-Repeat:
shutdown -r now
>Fix:
Yes, please.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Fri, 31 Aug 2018 14:47:40 +0000
State-Changed-Why:
No issue here. It's just that your re0 doesn't have an address assigned,
and that therefore NPF can't get the IPv4 address associated to it.
That's what the error message indicates by the way. I've tested on a
local interface, I get the same.
I'm closing this PR.
State-Changed-From-To: closed->open
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Fri, 31 Aug 2018 18:45:02 +0000
State-Changed-Why:
reopen fixable PR. the problem is valid and seemingly fixable.
i currently workaround it in my dhcpcd configuration by having that
run npf reload, but there's no good reason why npf can't know about
addresses being assigned and doing the right fix ups automatically,
so i don't see why this PR should be closed.
State-Changed-From-To: open->feedback
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Sun, 02 Sep 2018 17:48:39 +0000
State-Changed-Why:
Don't we already support that? See ifaddrs(re0) instead of inet4(re0).
inetX is a static list, ifaddrs is dynamic.
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, maxv@NetBSD.org,
szptvlfn@a-net.email.ne.jp
Subject: re: bin/49776 (npf at boot-time)
Date: Mon, 03 Sep 2018 11:14:07 +1000
maxv@NetBSD.org writes:
> Synopsis: npf at boot-time
>
> State-Changed-From-To: open->feedback
> State-Changed-By: maxv@NetBSD.org
> State-Changed-When: Sun, 02 Sep 2018 17:48:39 +0000
> State-Changed-Why:
> Don't we already support that? See ifaddrs(re0) instead of inet4(re0).
> inetX is a static list, ifaddrs is dynamic.
oh! that appears to have appeared since netbsd 7 -era NPF.
it certainly is documented to be what i want, and what this
PR seems to be about.
i doubt we're going to pullup npf changes to -7? so, PR is
closeable for me.
thanks.
.mrg.
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, maxv@NetBSD.org,
szptvlfn@a-net.email.ne.jp
Subject: re: bin/49776 (npf at boot-time)
Date: Mon, 03 Sep 2018 17:35:28 +1000
maxv@NetBSD.org writes:
> Synopsis: npf at boot-time
> =
> State-Changed-From-To: open->feedback
> State-Changed-By: maxv@NetBSD.org
> State-Changed-When: Sun, 02 Sep 2018 17:48:39 +0000
> State-Changed-Why:
> Don't we already support that? See ifaddrs(re0) instead of inet4(re0).
> inetX is a static list, ifaddrs is dynamic.
actually, it seems that you can't use this in NAT rules. eg, in =
"map .... -> ifaddrs(foo)" (whether ifaddrs(foo) is a variable or
not), errors occur, eg:
/etc/npf.conf:13:42: syntax error near 'ifaddrs'
or
/etc/npf.conf:15:0: variable 'outside_ip' is of type 'table' not 'family-a=
ddress-mask'
.mrg.
From: Ryosuke Moro <szptvlfn@a-net.email.ne.jp>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/49776 (npf at boot-time)
Date: Sat, 6 Oct 2018 06:18:23 +0900
on my side,
NetBSD tensor 8.99.24 NetBSD 8.99.24 (insomnia) #0: Thu Sep 13 22:27:45 JST 2018
root@tensor:/usr/obj/sys/arch/amd64/compile/insomnia amd64
( cvs update -D "2018-08-26 12:00:00 UTC" )
it works with both cases( inetX(), ifaddrs() ).
thanks
--
Ryosuke
State-Changed-From-To: feedback->closed
State-Changed-By: rmind@NetBSD.org
State-Changed-When: Sat, 19 Jan 2019 21:45:08 +0000
State-Changed-Why:
Fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.