Date: Mon, 10 Aug 2009 14:53:37 GMT From: Gabor Pali <pgj@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 167177 for review Message-ID: <200908101453.n7AErb4M042060@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167177 Change 167177 by pgj@petymeg-current on 2009/08/10 14:53:23 Add a default value for network interface, when no interface exists for a given route. Affected files ... .. //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_route.c#3 edit Differences ... ==== //depot/projects/soc2009/pgj_libstat/src/lib/libnetstat/netstat_route.c#3 (text+ko) ==== @@ -288,9 +288,10 @@ rtp->rt_gateway = extract_address(rte->rt_gateway, NULL, RTF_HOST); rtp->rt_refs = rte->rt_refcnt; rtp->rt_used = rte->rt_use; - if (rte->rt_ifp != NULL) { + if (rte->rt_ifp != NULL) rtp->rt_interface = strdup(rte->rt_ifp->if_xname); - } + else + rtp->rt_interface = strdup("---"); if (rte->rt_rmx.rmx_expire > 0) { if (clock_gettime(CLOCK_UPTIME, &uptime) < 0) { warn("netstat_route: clock_gettime() failed");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908101453.n7AErb4M042060>
