Den ons 23 okt. 2019 kl 09:15 skrev Peter J. Philipp <[email protected]>:

> Hi Holger & Tech,
>
> I have made my octeon router work again and I have a patch.
>
>
Truncated it a lot, leaving the things I reacted on:


> -               sppp_auth_send(&chap, sp, CHAP_RESPONSE, h->ident,
> -                              sizeof dsize, (const char *)&dsize,
> +               sppp_auth_send(&chap, sp, CHAP_RESPONSE, h->ident, 0x1,
> +                              1, dsize,
>


> -       sppp_auth_send(&chap, sp, CHAP_CHALLENGE, sp->confid[IDX_CHAP],
> -                      sizeof clen, (const char *)&clen,
> +       sppp_auth_send(&chap, sp, CHAP_CHALLENGE, sp->confid[IDX_CHAP],
> 0x1,
> +                      1, clen,
>


> -                                      sizeof mlen, (const char *)&mlen,
> +                                      0x1,
> +                                      1, mlen,
>


> -                      sizeof idlen, (const char *)&idlen,
> -                      (size_t)idlen, sp->myauth.name,
> -                      sizeof pwdlen, (const char *)&pwdlen,
> -                      (size_t)pwdlen, sp->myauth.secret,
> +                      0x5,
> +                      1, s_id,
> +                      s_id, sp->myauth.name,
> +                      1, s_pwd,
> +                      s_pwd, sp->myauth.secret,
>

For all the good this patch might do, it still replaces a lot of things in
the source with names like XYZlen with 0x1 or 0x5,
so it will be much harder later on to figure out why some part is sending 5
over to the function it calls. 8-/
Magic constants makes peoples eyes hurt.

-- 
May the most significant bit of your life be positive.

Reply via email to