Date: Wed, 21 Feb 2018 20:45:44 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329750 - head/lib/libifconfig Message-ID: <201802212045.w1LKjiZt092559@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Wed Feb 21 20:45:43 2018 New Revision: 329750 URL: https://svnweb.freebsd.org/changeset/base/329750 Log: libifconfig: fix ifconfig_set_metric Due to a copy/paste error, ifconfig_set_metric actually set the mtu, not the metric. See Also: https://github.com/Savagedlight/libifconfig/issues/48 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Modified: head/lib/libifconfig/libifconfig.c Modified: head/lib/libifconfig/libifconfig.c ============================================================================== --- head/lib/libifconfig/libifconfig.c Wed Feb 21 20:32:23 2018 (r329749) +++ head/lib/libifconfig/libifconfig.c Wed Feb 21 20:45:43 2018 (r329750) @@ -377,13 +377,13 @@ ifconfig_get_mtu(ifconfig_handle_t *h, const char *nam } int -ifconfig_set_metric(ifconfig_handle_t *h, const char *name, const int mtu) +ifconfig_set_metric(ifconfig_handle_t *h, const char *name, const int metric) { struct ifreq ifr; memset(&ifr, 0, sizeof(ifr)); (void)strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); - ifr.ifr_mtu = mtu; + ifr.ifr_metric = metric; if (ifconfig_ioctlwrap(h, AF_LOCAL, SIOCSIFMETRIC, &ifr) < 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802212045.w1LKjiZt092559>