Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 May 2019 13:05:21 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r347123 - stable/12/sys/net
Message-ID:  <201905041305.x44D5LvI094581@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat May  4 13:05:21 2019
New Revision: 347123
URL: https://svnweb.freebsd.org/changeset/base/347123

Log:
  MFC r346197:
  When sending a routing message, don't allow the user to set the
  RTF_RNH_LOCKED flag in rtm_flags, since this flag is used only
  internally.
  
  Reviewed by:		ae@
  Differential Revision:	https://reviews.freebsd.org/D19898

Modified:
  stable/12/sys/net/rtsock.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/rtsock.c
==============================================================================
--- stable/12/sys/net/rtsock.c	Sat May  4 13:02:46 2019	(r347122)
+++ stable/12/sys/net/rtsock.c	Sat May  4 13:05:21 2019	(r347123)
@@ -615,6 +615,8 @@ route_output(struct mbuf *m, struct socket *so, ...)
 	if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info))
 		senderr(EINVAL);
 
+	if (rtm->rtm_flags & RTF_RNH_LOCKED)
+		senderr(EINVAL);
 	info.rti_flags = rtm->rtm_flags;
 	if (info.rti_info[RTAX_DST] == NULL ||
 	    info.rti_info[RTAX_DST]->sa_family >= AF_MAX ||



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