lkml.org 
[lkml]   [2009]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] SMACK netfilter smacklabel socket match
    hello,

    Paul Moore wrote:
    ..
    > Well, since you have some time and willingness to do things "the right way" I
    > would recommend dropping these patches (which are really just band-aids) and
    > working on the right solution to stored the addresses/masks in a sorted list
    > with the mask already applied.
    >
    OK, I'm about to send a new patch; but while testing my patches and reading code, I noticed another bug :

    In smackfs.c:smk_write_netlbladdr
    the netmask mask.s_addr is not handled correctly, the netmask should be :
    1- computed in u32
    2- converted to be32 !!
    with current code, a "pseudo u32 mask" is applied to a be32 ipaddr; it occurs to works for "common netmasks" (multiple of 8), not for "intermediate" mask (/15, /25)


    > FWIW, the NetLabel code (net/netlabel) has to do very similar things with
    > sorted address lists so I built an address list construct which builds on the
    > list.h ideas and operates in a similar way. You may find it helpful.
    >
    OK, I tested some code in userspace and when i was confident enough coded it to kernel

    >> I think this should go to stable too?
    >
    > I would worry about getting the patches developed, tested and in an acceptable
    > form first, then we can worry about where they should be applied ;)
    >

    OK :)


    \
     
     \ /
      Last update: 2009-02-18 19:31    [W:0.027 / U:30.324 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site