]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/ipaddress.c
ipaddress: Abstract IFA_LABEL matching code
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 15 Feb 2018 21:23:16 +0000 (23:23 +0200)
committerDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:09 +0000 (08:14 -0800)
commit17df3d607d43a0a37468a0e3863fcb27ff55300d
tree4d9312e55fbbf9be95947099571239de3fd4d3f3
parent5433656705344e552ceffcc1cf4fe0c74a68f05a
ipaddress: Abstract IFA_LABEL matching code

There at least two places in ip/ipaddress.c where we match IFA_LABEL
against filter.label if that is given.

Get rid of "common" if () statement for inet_addr_match_rta() and
ifa_label_match_rta(): it is not common because first will check for
filter.pfx.family != AF_UNSPEC inside and second for filter.label being
non NULL.

This allows us to further simplify down code and prepare for
ll_idx_n2a() replacement with ll_index_to_name() without 80 columns
checkpatch notice.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/ipaddress.c