Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 1999 07:01:23 +0200
From:      "Martin Husemann" <martin@rumolt.teuto.de>
To:        "Gary Jennejohn" <garyj@muc.de>, <mranner@netway.a>
Cc:        <freebsd-isdn@FreeBSD.ORG>
Subject:   RE: problems with 0.83 and sPPP
Message-ID:  <NCBBKMPDNDDMCAGNFNDIAEPBCJAA.martin@rumolt.teuto.de>
In-Reply-To: <199909282132.XAA00525@peedub.muc.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> + 	u_long subcmd;
>   	struct ifreq *ifr = (struct ifreq *)data;
>   	struct spppreq spr;
>
>   	/*
>   	 * ifr->ifr_data is supposed to point to a struct spppreq.
> + 	 * Check the cmd word first before attempting to fetch all the
> + 	 * data.
> + 	 */
> + 	if ((subcmd = fuword(ifr->ifr_data)) == -1)
> + 		return EFAULT;
> +
> + 	/*
> + 	 * ifr->ifr_data is supposed to point to a struct spppreq.

This is bogus. It relies on knowledge of the compilers structure packing and
it doesn't work on alpha. We explicitly removed it some versions ago...

The much simpler solution is to cast spr.cmd to the right type in the
switch() or fix it's declaration ;-)


Martin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NCBBKMPDNDDMCAGNFNDIAEPBCJAA.martin>