]> git.proxmox.com Git - mirror_iproute2.git/commit
ip/tunnel: Unify local/remote endpoint address printing
authorSerhey Popovych <serhe.popovych@gmail.com>
Wed, 24 Jan 2018 18:56:40 +0000 (20:56 +0200)
committerDavid Ahern <dsahern@gmail.com>
Thu, 25 Jan 2018 17:31:29 +0000 (09:31 -0800)
commitb761fc41132a6a9fb5ebc45a400ffc7a8ffafaed
treeba330d3cfa7f9ce4743324799710a6a97abc6167
parent228f2e97bad048d6c04ee75d585571660761aa4e
ip/tunnel: Unify local/remote endpoint address printing

Introduce and use tnl_print_endpoint() helper to print of tunnel
endpoint address.

Note that for AF_INET and AF_INET6 inet_ntop(3) is used that may return
NULL in case of failure and while unlikely format_host_rta() might
return NULL too. Handle this case when passing local/remote to
print_string().

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/link_gre.c
ip/link_gre6.c
ip/link_ip6tnl.c
ip/link_iptnl.c
ip/link_vti.c
ip/link_vti6.c
ip/tunnel.c
ip/tunnel.h