Subject: mistake in ipnat(5) about rdr syntax
To: None <tech-net@netbsd.org>
From: Richard Braun <syn@sceen.net>
List: tech-net
Date: 05/03/2005 20:48:23
--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello,

It seems ipnat accepts such a rule :
rdr pppoe0 from 0.0.0.0/0 to 213.41.131.45/32 port =3D 8080 -> 10.0.1.11 po=
rt 8080

It seems however that the rdr syntax in ipnat(5) is :
redir ::=3D "rdr" ifname ipmask dport "->" ip [ "," ip ] rdrport rdroptions=
 .
ifname ::=3D 'A' - 'Z' { 'A' - 'Z' } numbers .
numbers ::=3D '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' .
ipmask ::=3D ip "/" bits | ip "/" mask | ip "netmask" mask .
dport ::=3D "port" portnum [ "-" portnum ] .
etc...

I guess it should be lhs instead ipmask since lhs has this syntax :
lhs ::=3D ipmask | fromto .
fromto ::=3D "from" object "to" object .
object :: =3D addr [ port-comp | port-range ] .
addr :: =3D "any" | nummask | host-name [ "mask" ipaddr | "mask" hexnumber =
] .
nummask ::=3D host-name [ "/" decnumber ] .
port-comp :: =3D "port" compare port-num .
port-range :: =3D "port" port-num range port-num .

I'm also wondering why some elements like ip or host-name aren't documented
as well. Any clue ?

--=20
Richard Braun

--5vNYLRcllDrimb99
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)

iD8DBQFCd8d3BlWsEPLYRi8RAgTXAJ0eSv6Yh/0199oootqPcSSVprST0ACdHakh
5f8ABKoDS4byqaRLBTVuRYo=
=FmH/
-----END PGP SIGNATURE-----

--5vNYLRcllDrimb99--