Subject: Re: CVS commit: src/sys/netinet
To: Martin Husemann <martin@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 04/01/2004 09:21:49
--6sX45UoQRIJXqkqR
Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ"
Content-Disposition: inline
--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Apr 01, 2004 at 09:24:58AM +0000, Martin Husemann wrote:
>=20
> Module Name: src
> Committed By: martin
> Date: Thu Apr 1 09:24:58 UTC 2004
>=20
> Modified Files:
> src/sys/netinet: ip_fil_netbsd.c
>=20
> Log Message:
> Untangle ioctl copyin/copyout confusion. IP-Filter now actually works
> on sparc64 (and probably everywhere else).
If I'm following this correctly, I think the following other changes are=20
also needed to maintain the pattern that we BCOPYIN the ioctl structure
itself, then COPYIN from pointers in it.
Someone please verify this and commit it. I don't have a machine to test=20
on yet.
Take care,
Bill
--lrZ03NoBR/3+SXJZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diffie
Content-Transfer-Encoding: quoted-printable
Index: fil.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/netinet/fil.c,v
retrieving revision 1.61
diff -u -r1.61 fil.c
--- fil.c 28 Mar 2004 09:01:26 -0000 1.61
+++ fil.c 1 Apr 2004 17:18:35 -0000
@@ -4360,7 +4360,7 @@
{
ipfunc_resolve_t res, *ft;
=20
- if (COPYIN(data, &res, sizeof(res)) !=3D 0)
+ if (BCOPYIN(data, &res, sizeof(res)) !=3D 0)
return EFAULT;
=20
if (res.ipfu_addr =3D=3D NULL && res.ipfu_name[0] !=3D '\0') {
Index: ip_lookup.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/netinet/ip_lookup.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ip_lookup.c
--- ip_lookup.c 28 Mar 2004 08:56:44 -0000 1.1.1.1
+++ ip_lookup.c 1 Apr 2004 17:18:35 -0000
@@ -214,7 +214,7 @@
ip_pool_t *p;
int err;
=20
- err =3D COPYIN(data, &op, sizeof(op));
+ err =3D BCOPYIN(data, &op, sizeof(op));
if (err !=3D 0)
return EFAULT;
op.iplo_name[sizeof(op.iplo_name) - 1] =3D '\0';
@@ -285,7 +285,7 @@
ip_pool_t *p;
int err;
=20
- err =3D COPYIN(data, &op, sizeof(op));
+ err =3D BCOPYIN(data, &op, sizeof(op));
if (err !=3D 0)
return EFAULT;
op.iplo_name[sizeof(op.iplo_name) - 1] =3D '\0';
@@ -346,7 +346,7 @@
iplookupop_t op;
int err;
=20
- err =3D COPYIN(data, &op, sizeof(op));
+ err =3D BCOPYIN(data, &op, sizeof(op));
if (err !=3D 0)
return EFAULT;
op.iplo_name[sizeof(op.iplo_name) - 1] =3D '\0';
@@ -389,7 +389,7 @@
iplookupop_t op;
int err;
=20
- err =3D COPYIN(data, &op, sizeof(op));
+ err =3D BCOPYIN(data, &op, sizeof(op));
if (err !=3D 0)
return EFAULT;
op.iplo_name[sizeof(op.iplo_name) - 1] =3D '\0';
@@ -432,7 +432,7 @@
iplookupop_t op;
int err;
=20
- err =3D COPYIN(data, &op, sizeof(op));
+ err =3D BCOPYIN(data, &op, sizeof(op));
if (err !=3D 0)
return EFAULT;
=20
@@ -468,7 +468,7 @@
int err, unit, num, type;
iplookupflush_t flush;
=20
- err =3D COPYIN(data, &flush, sizeof(flush));
+ err =3D BCOPYIN(data, &flush, sizeof(flush));
if (err !=3D 0)
return EFAULT;
=20
--lrZ03NoBR/3+SXJZ--
--6sX45UoQRIJXqkqR
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFAbE+tWz+3JHUci9cRAut6AJ9nSsB3bdmg5Ft89qiYdLIq6BBSswCfSXAy
gSeLcZKTyNjzpFv0b8nWwmM=
=VP7f
-----END PGP SIGNATURE-----
--6sX45UoQRIJXqkqR--