+
+ /*
+ * Silent version of RTM_GET for Reachabiltiy APIs. We may change
+ * all RTM_GETs to be silent in the future, so this is private for now.
+ */
+ if (rtm->rtm_type == RTM_GET_SILENT) {
+ if ((so->so_options & SO_USELOOPBACK) == 0)
+ senderr(EINVAL);
+ sendonlytoself = 1;
+ rtm->rtm_type = RTM_GET;
+ }
+
+ /*
+ * Perform permission checking, only privileged sockets
+ * may perform operations other than RTM_GET
+ */
+ if (rtm->rtm_type != RTM_GET && (so->so_state & SS_PRIV) == 0) {
+ dst = 0;
+ senderr(EPERM);
+ }