From owner-svn-src-head@freebsd.org Wed Feb 21 20:45:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F48F28D9B; Wed, 21 Feb 2018 20:45:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47B2871EE8; Wed, 21 Feb 2018 20:45:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E50E1D8A0; Wed, 21 Feb 2018 20:45:44 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1LKjijx092560; Wed, 21 Feb 2018 20:45:44 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1LKjiZt092559; Wed, 21 Feb 2018 20:45:44 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201802212045.w1LKjiZt092559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 21 Feb 2018 20:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329750 - head/lib/libifconfig X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/lib/libifconfig X-SVN-Commit-Revision: 329750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 20:45:44 -0000 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) {