From owner-svn-src-all@freebsd.org Mon Sep 3 22:14:38 2018 Return-Path: Delivered-To: svn-src-all@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 1A9E2FF82B2; Mon, 3 Sep 2018 22:14:38 +0000 (UTC) (envelope-from bz@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 C08257907D; Mon, 3 Sep 2018 22:14:37 +0000 (UTC) (envelope-from bz@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 B9EF46271; Mon, 3 Sep 2018 22:14:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w83MEbiD022388; Mon, 3 Sep 2018 22:14:37 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w83MEbTa022387; Mon, 3 Sep 2018 22:14:37 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201809032214.w83MEbTa022387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 3 Sep 2018 22:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338449 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 338449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Sep 2018 22:14:38 -0000 Author: bz Date: Mon Sep 3 22:14:37 2018 New Revision: 338449 URL: https://svnweb.freebsd.org/changeset/base/338449 Log: Replicate r307234 from legacy IP to IPv6 code, using the RO_RTFREE() macro rather than hand crafted code. No functional changes. Reviewed by: karels Approved by: re (rgrimes) Differential Revision: https://reviews.freebsd.org/D17006 Modified: head/sys/netinet6/in6_pcb.c Modified: head/sys/netinet6/in6_pcb.c ============================================================================== --- head/sys/netinet6/in6_pcb.c Mon Sep 3 22:12:48 2018 (r338448) +++ head/sys/netinet6/in6_pcb.c Mon Sep 3 22:14:37 2018 (r338449) @@ -849,10 +849,7 @@ void in6_losing(struct inpcb *in6p) { - if (in6p->inp_route6.ro_rt) { - RTFREE(in6p->inp_route6.ro_rt); - in6p->inp_route6.ro_rt = (struct rtentry *)NULL; - } + RO_RTFREE(&in6p->inp_route6); if (in6p->inp_route6.ro_lle) LLE_FREE(in6p->inp_route6.ro_lle); /* zeros ro_lle */ return; @@ -866,10 +863,7 @@ struct inpcb * in6_rtchange(struct inpcb *inp, int errno) { - if (inp->inp_route6.ro_rt) { - RTFREE(inp->inp_route6.ro_rt); - inp->inp_route6.ro_rt = (struct rtentry *)NULL; - } + RO_RTFREE(&in6p->inp_route6); if (inp->inp_route6.ro_lle) LLE_FREE(inp->inp_route6.ro_lle); /* zeros ro_lle */ return inp;