mirror_iproute2/lib
Hangbin Liu 5ce897a03b utils: return default family when rtm_family is not RTNL_FAMILY_IPMR/IP6MR
When we get a multicast route, the rtm_type is RTN_MULTICAST, but the
rtm_family may be AF_INET. If we only check the type with RTNL_FAMILY_IPMR,
we will get malformed address. e.g.

+ ip -4 route add multicast 172.111.1.1 dev em1 table main

Before fix:
+ ip route list type multicast table main
multicast ac6f:101:800:400:400:0:3c00:0 dev em1 scope link

After fix:
+ ip route list type multicast table main
multicast 172.111.1.1 dev em1 scope link

Fixes: 56e3eb4c34 ("ip: route: fix multicast route dumps")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Phil Sutter <phil@nwl.cc>
2017-07-27 11:27:17 -07:00
..
bpf.c bpf: fix mnt path when from env 2017-07-25 11:43:28 -07:00
color.c color: use "light" colors for dark background 2017-03-03 09:58:05 -08:00
coverity_model.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
dnet_ntop.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
dnet_pton.c dnet: fix strict aliasing warnings 2010-07-23 12:30:48 -07:00
exec.c move cmd_exec to lib utils 2016-12-13 10:20:16 -08:00
fs.c ip vrf: Add command name next to pid 2017-04-16 10:19:32 -07:00
inet_proto.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
ipx_ntop.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
ipx_pton.c utils: provide get_hex to read a hex digit from a char 2016-06-08 09:30:41 -07:00
json_writer.c json_writer: Removed automatic json-object type from the constructor 2016-07-20 12:02:02 -07:00
libgenl.c libgenl: introduce genl_init_handle 2016-08-17 13:59:21 -07:00
libnetlink.c netlink: Change rtnl_dump_done to always show error 2017-05-30 17:32:38 -07:00
ll_addr.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
ll_map.c fix netlink message length checks 2016-10-09 18:48:30 -07:00
ll_proto.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
ll_types.c remove duplicated #include's 2017-07-18 17:17:15 -07:00
Makefile whitespace cleanup 2017-01-12 17:31:20 -08:00
mpls_ntop.c ip: mpls: fix printing of mpls labels 2017-05-11 11:08:02 -07:00
mpls_pton.c ip: add support for more MPLS labels 2017-05-22 11:03:02 -07:00
names.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
namespace.c lib/namespace: fix fd leakage in non-error case 2015-08-19 16:32:56 -07:00
rt_names.c ip route: Make name of protocol 0 consistent 2017-02-17 15:12:29 -08:00
utils.c utils: return default family when rtm_family is not RTNL_FAMILY_IPMR/IP6MR 2017-07-27 11:27:17 -07:00