The attribute of FRA_TABLE is not just a 32-bit integer, some constants
have well-known symbolic names like RT_TABLE_DEFAULT.
* rtnl_rule.c (fib_rule_hdr_nla_decoders) <FRA_TABLE>:
Use decode_nla_rt_class.
* tests/nlattr_fib_rule_hdr.c (FRA_TABLE): New macro.
(main): Check FRA_TABLE decoding.
[FRA_TUN_ID] = decode_nla_be64,
[FRA_SUPPRESS_IFGROUP] = decode_nla_u32,
[FRA_SUPPRESS_PREFIXLEN] = decode_nla_u32,
- [FRA_TABLE] = decode_nla_u32,
+ [FRA_TABLE] = decode_nla_rt_class,
[FRA_FWMASK] = decode_nla_u32,
[FRA_OIFNAME] = decode_nla_str,
[FRA_PAD] = NULL,
# include <linux/rtnetlink.h>
#define FRA_TUN_ID 12
+#define FRA_TABLE 15
#define FRA_UID_RANGE 20
static void
FRA_DST, 4, pattern, 4,
print_quoted_hex(pattern, 4));
+ const uint32_t table_id = RT_TABLE_DEFAULT;
+ TEST_NLATTR_OBJECT(fd, nlh0, hdrlen,
+ init_rtmsg, print_rtmsg,
+ FRA_TABLE, pattern, table_id,
+ printf("RT_TABLE_DEFAULT"));
+
#ifdef HAVE_STRUCT_FIB_RULE_UID_RANGE
static const struct fib_rule_uid_range range = {
.start = 0xabcdedad,