]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv4: fix table id in getroute response
authorDavid Ahern <dsa@cumulusnetworks.com>
Wed, 11 Jan 2017 23:42:17 +0000 (15:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2017 20:18:20 +0000 (15:18 -0500)
commite603b849f35bcdae277a0cfea967df03a7c6be71
tree6bc4c1d06a7e1e4f649886d1bf11e307578ea1f9
parentf7506b61f0ef414c0e95c887a8d19c36fecc4fed
net: ipv4: fix table id in getroute response

rtm_table is an 8-bit field while table ids are allowed up to u32. Commit
94f813c3b106 ("net: Fix routing tables with id > 255 for legacy software")
added the preference to set rtm_table in dumps to RT_TABLE_COMPAT if the
table id is > 255. The table id returned on get route requests should do
the same.

Fixes: a2e043bb5ded ("net: Allow user to get table id from route lookup")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c