From owner-svn-src-head@freebsd.org Sat Feb 24 21:56:07 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 8D812F26595; Sat, 24 Feb 2018 21:56:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 162B27993C; Sat, 24 Feb 2018 21:56:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w1OLu262002676; Sat, 24 Feb 2018 13:56:02 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w1OLu1gT002675; Sat, 24 Feb 2018 13:56:01 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201802242156.w1OLu1gT002675@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r329930 - head/sbin/route In-Reply-To: <201802242125.w1OLPvia008757@repo.freebsd.org> To: Eugene Grosbein Date: Sat, 24 Feb 2018 13:56:01 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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: Sat, 24 Feb 2018 21:56:07 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eugen > Date: Sat Feb 24 21:25:56 2018 > New Revision: 329930 > URL: https://svnweb.freebsd.org/changeset/base/329930 > > Log: > route(8): make it possible to manually delete pinned route > > Reported by: Andreas Longwitz > Approved by: avg (mentor) > MFC after: 1 week > > Modified: > head/sbin/route/route.c > > Modified: head/sbin/route/route.c > ============================================================================== > --- head/sbin/route/route.c Sat Feb 24 20:47:22 2018 (r329929) > +++ head/sbin/route/route.c Sat Feb 24 21:25:56 2018 (r329930) > @@ -1519,8 +1519,10 @@ rtmsg(int cmd, int flags, int fib) > so[RTAX_IFP].ss_len = sizeof(struct sockaddr_dl); > rtm_addrs |= RTA_IFP; > } > - } else > + } else { > cmd = RTM_DELETE; > + flags |= RTF_PINNED; > + } That pretty much defeats the purpose of a PINNED route if by default route delete is going to delete them. > #define rtm m_rtmsg.m_rtm > rtm.rtm_type = cmd; > rtm.rtm_flags = flags; > > -- Rod Grimes rgrimes@freebsd.org