Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2018 21:25:57 +0000 (UTC)
From:      Eugene Grosbein <eugen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329930 - head/sbin/route
Message-ID:  <201802242125.w1OLPvia008757@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <longwitz@incore.de>
  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;
+	}
 #define rtm m_rtmsg.m_rtm
 	rtm.rtm_type = cmd;
 	rtm.rtm_flags = flags;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802242125.w1OLPvia008757>