• Jamal Hadi Salim's avatar
    net sched: fix encoding to use real length · 28a10c42
    Jamal Hadi Salim authored
    Encoding of the metadata was using the padded length as opposed to
    the real length of the data which is a bug per specification.
    This has not been an issue todate because all metadatum specified
    so far has been 32 bit where aligned and data length are the same width.
    This also includes a bug fix for validating the length of a u16 field.
    But since there is no metadata of size u16 yes we are fine to include it
    here.
    
    While at it get rid of magic numbers.
    
    Fixes: ef6980b6 ("net sched: introduce IFE action")
    Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    28a10c42
act_ife.c 19.7 KB