From a886247185c6a2c697caeac815f4eba3190547fc Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Wed, 15 Aug 2001 13:05:39 +0000 Subject: [PATCH] Don't show a prefixlen when a destination address is present in ``show iface''. --- usr.sbin/ppp/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/iface.c b/usr.sbin/ppp/iface.c index d8fa2067dd60..adf84ce1f12f 100644 --- a/usr.sbin/ppp/iface.c +++ b/usr.sbin/ppp/iface.c @@ -647,7 +647,8 @@ iface_Show(struct cmdargs const *arg) prompt_Printf(arg->prompt, " --> %s", ncpaddr_ntoa(&iface->addr[f].peer)); ncprange_getwidth(&iface->addr[f].ifa, &width); - prompt_Printf(arg->prompt, " prefixlen %d", width); + if (ncpaddr_family(&iface->addr[f].peer) == AF_UNSPEC) + prompt_Printf(arg->prompt, " prefixlen %d", width); if ((scopeid = ncprange_scopeid(&iface->addr[f].ifa)) != -1) prompt_Printf(arg->prompt, " scopeid 0x%x", (unsigned)scopeid); break;