• Daniel Borkmann's avatar
    ip, realms: also allow to pass in raw realms value · d583e88e
    Daniel Borkmann authored
    If get_rt_realms() fails, try to get a possible raw u32 realms
    value for the u32 RTA_FLOW/FRA_FLOW attribute, as it might be
    useful to directly configure the hex value itself. And only if
    that fails, then bail out.
    
    The source realm is provided in the upper u16 (mask: 0xffff0000)
    and the destination realm through the lower u16 part (mask:
    0x0000ffff). This can be useful for tc's bpf realm matcher, but
    also a full hex/mask param can be provided already for matching
    through iptables' --realm cmdline option, for example.
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    d583e88e
iprule.c 14.3 KB