]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/iproute.c
ip, realms: also allow to pass in raw realms value
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 8 Oct 2015 10:22:39 +0000 (12:22 +0200)
committerStephen Hemminger <shemming@brocade.com>
Fri, 23 Oct 2015 06:40:51 +0000 (23:40 -0700)
commitd583e88ebc859d6ef5bddffb098fa95158d55c75
treec8acecab438b3a6d48bdda7ef790bd916d8845b3
parent89bb4c6aca8a3b8fe009ece35f4b7380a28ef44d
ip, realms: also allow to pass in raw realms value

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: Daniel Borkmann <daniel@iogearbox.net>
include/rtm_map.h
ip/iproute.c
ip/iprule.c
ip/rtm_map.c