[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [sparc64] nft bus error



Anatoly Pugachev <matorola@gmail.com> wrote:
> > diff --git a/src/udata.c b/src/udata.c
> > --- a/src/udata.c
> > +++ b/src/udata.c
> > @@ -122,9 +122,11 @@ void *nftnl_udata_get(const struct nftnl_udata *attr)
> >  EXPORT_SYMBOL(nftnl_udata_get_u32);
> >  uint32_t nftnl_udata_get_u32(const struct nftnl_udata *attr)
> >  {
> > -       uint32_t *data = (uint32_t *)attr->value;
> > +       uint32_t data;
> >
> > -       return *data;
> > +       memcpy(&data, attr->value, sizeof(data));
> > +
> > +       return data;
> >  }
> >
> >  EXPORT_SYMBOL(nftnl_udata_next);
> 
> 
> Florian,
> 
> yes, works beautifully!

Great, i've applied this fix to libnftnl.git.


Reply to: