mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
d583e88ebc
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>
10 lines
222 B
C
10 lines
222 B
C
#ifndef __RTM_MAP_H__
|
|
#define __RTM_MAP_H__ 1
|
|
|
|
char *rtnl_rtntype_n2a(int id, char *buf, int len);
|
|
int rtnl_rtntype_a2n(int *id, char *arg);
|
|
|
|
int get_rt_realms_or_raw(__u32 *realms, char *arg);
|
|
|
|
#endif /* __RTM_MAP_H__ */
|