]> granicus.if.org Git - strace/commit
rtnl_route: enhance RTA_TABLE decoding
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 29 Aug 2017 10:09:04 +0000 (10:09 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 29 Aug 2017 10:09:04 +0000 (10:09 +0000)
commita6a1bc9abcb22ed01bf9ffd6dbf8ccbadf79ba7d
treed9d2b11fbf877d9fe1e898ea5f9c7ff1e16e2b1c
parentb2278dc30aa13ab1b268ab9267ddb4c517cce3fb
rtnl_route: enhance RTA_TABLE decoding

The attribute of RTA_TABLE is not just a 32-bit integer, some constants
have well-known symbolic names like RT_TABLE_DEFAULT.

* nlattr.h (decode_nla_rt_class): New prototype.
* rtnl_route.c (decode_nla_rt_class): New function.
(rtmsg_nla_decoders) <RTA_TABLE>: Use it.
* tests/nlattr_rtmsg.c (main): Check RTA_TABLE decoding.
nlattr.h
rtnl_route.c
tests/nlattr_rtmsg.c