]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4/route: Allow NULL flowinfo in rt_fill_info()
authorStefano Brivio <sbrivio@redhat.com>
Fri, 21 Jun 2019 15:45:22 +0000 (17:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jun 2019 17:18:48 +0000 (10:18 -0700)
commit16ded2b1f80483cd6ef7f1a26812e6008d214491
tree8e16d6fbdaa4f42cbc4600db6884e32b56adcbed
parente5b865edb5722522d25db1299d73fb79fb47bab8
ipv4/route: Allow NULL flowinfo in rt_fill_info()

In the next patch, we're going to use rt_fill_info() to dump exception
routes upon RTM_GETROUTE with NLM_F_ROOT, meaning userspace is requesting
a dump and not a specific route selection, which in turn implies the input
interface is not relevant. Update rt_fill_info() to handle a NULL
flowinfo.

v7: If fl4 is NULL, explicitly set r->rtm_tos to 0: it's not initialised
    otherwise (spotted by David Ahern)

v6: New patch

Suggested-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c