Date: Thu, 2 Jun 2005 11:04:02 -0700 From: "Li, Qing" <qing.li@bluecoat.com> To: "Andre Oppermann" <andre@freebsd.org> Cc: freebsd-net@freebsd.org Subject: RE: issue with route Message-ID: <48D44BB27BDE3840BDF18E59CB169A5C010AF884@bcs-mail3.internal.cacheflow.com>
next in thread | raw e-mail | index | archive | help
>=20 > Please post unified diffs, they are far easier to read for humans. >=20 Sorry, here is the patch again. -- Qing Index: route.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: /home/ncvs/src/sys/net/route.c,v retrieving revision 1.108 diff -u -r1.108 route.c --- route.c 7 Jan 2005 01:45:35 -0000 1.108 +++ route.c 2 Jun 2005 17:49:28 -0000 @@ -743,8 +743,12 @@ goto makeroute; case RTM_ADD: - if ((flags & RTF_GATEWAY) && !gateway) - panic("rtrequest: GATEWAY but no gateway"); + if (flags & RTF_GATEWAY) { + if (!gateway) + panic("rtrequest: GATEWAY but no gateway"); + if (dst && (dst->sa_family !=3D gateway->sa_family)) + senderr(EINVAL); + } if (info->rti_ifa =3D=3D NULL && (error =3D = rt_getifa(info))) senderr(error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48D44BB27BDE3840BDF18E59CB169A5C010AF884>