aboutsummaryrefslogtreecommitdiff
path: root/sbin/route
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2018-02-24 21:25:56 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2018-02-24 21:25:56 +0000
commit0d41f9c9f01983c8999ced188995c8f34b0f84d1 (patch)
tree1d0b61bb84c5cbfcb849be9196f779817efd30d8 /sbin/route
parent59d3150b583b6cac2ea64025a5f9c2bb1829aca2 (diff)
downloadsrc-0d41f9c9f01983c8999ced188995c8f34b0f84d1.tar.gz
src-0d41f9c9f01983c8999ced188995c8f34b0f84d1.zip
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
Notes
Notes: svn path=/head/; revision=329930
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/route.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 6c41c853b5c9..f90f5da40a31 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -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;