Re: ebtables behaving weirdly on MIPS platform

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

 



On Thu, Sep 30, 2021 at 12:52:23PM +0200, Florian Westphal wrote:
> Phil Sutter <phil@xxxxxx> wrote:
> > On Thu, Sep 30, 2021 at 11:53:32AM +0530, Senthil Kumar Balasubramanian wrote:
> > > However, dumping the data that goes to the kernel, we see a huge
> > > difference between MIPS and ARM..
> > > 
> > > in ARM platform
> > >  w_l->w:
> > >   0000  6e 66 6c 6f 67 00 ff b6 00 00 00 00 00 00 00 00  nflog...........
> > >   0010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> > >   0020  50 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00  P...............
> > >   0030  45 4e 54 52 59 31 00 00 00 00 00 00 00 00 00 00  ENTRY1..........
> > >   0040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> > >   0050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> > >   0060  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> > >   0070  00 00 00 00
> > > 
> > > in tplink a6 (MIPS platform)
> > > 
> > >  w_l->w:
> > >   0000  6e 66 6c 6f 67 00 b2 e0 69 6d 69 74 20 65 78 63    nflog...imit exc
> > >   0010  65 65 64 65 64 00 56 69 72 74 75 61 6c 20 74 69    eeded.Virtual ti
> > >   0020  00 00 00 50 65 78 70 69 00 01 00 01 50 72 6f 66     ...Pexpi....Prof
> > >   0030  45 4e 54 52 59 31 00 69 6d 65 72 20 65 78 70 69    ENTRY1.imer expi
> > >   0040  72 65 64 00 57 69 6e 64 6f 77 20 63 68 61 6e 67     red.Window chang
> > >   0050  65 64 00 49 2f 4f 20 70 6f 73 73 69 62 6c 65 00        ed.I/O possible.
> > >   0060  50 6f 77 65 72 20 66 61 69 6c 75 72 65 00 42 61       Power failure.Ba
> > >   0070  64 20 73 79
> > >               d sy
> > > 
> > > Can you please let me know what's going wrong with this?
> > 
> > Looks like the data structure contains garbage. Looking at ebtables
> > code, that seems likely as extension data structures are allocated using
> > malloc() and never set zero. init() function in ebt_nflog.c only
> > initializes prefix, group and threshold fields (which seem to be set
> > correctly in your MIPS dump).
> 
> Yes, probably pure luck (libc differences and the like).
> 
> Senthil, can you try this patch (compile tested only)?

Yes. this patch work... Good and quick catch..




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux