OSDN Git Service

ipv4: Refactor nexthop attributes in fib_dump_info
authorDavid Ahern <dsahern@gmail.com>
Tue, 2 Apr 2019 21:11:56 +0000 (14:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 04:50:20 +0000 (21:50 -0700)
commitb0f60193632e4eab4c9663101bb435dd7bc27ae8
treec979313a61f0acd2d0b6a8eb4b7b1336a70c34ce
parenteba618abacade71669eb67c3360eecfee810cc88
ipv4: Refactor nexthop attributes in fib_dump_info

Similar to ipv6, move addition of nexthop attributes to dump
message into helpers that are called for both single path and
multipath routes. Align the new helpers to the IPv6 variant
which most notably means computing the flags argument based on
settings in nh_flags.

The RTA_FLOW argument is unique to IPv4, so it is appended after
the new fib_nexthop_info helper. The intent of a later patch is to
make both fib_nexthop_info and fib_add_nexthop usable for both IPv4
and IPv6. This patch is stepping stone in that direction.

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c