diff options
-rw-r--r-- | sbin/route/route.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c index dcd1ddc..474ac72 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -273,6 +273,8 @@ retry: rtm->rtm_type = RTM_DELETE; rtm->rtm_seq = seqno; rlen = write(s, next, rtm->rtm_msglen); + if (rlen < 0 && errno == EPERM) + err(1, "write to routing socket"); if (rlen < (int)rtm->rtm_msglen) { warn("write to routing socket"); (void) printf("got only %d for rlen\n", rlen); @@ -1223,6 +1225,8 @@ rtmsg(cmd, flags) if (debugonly) return (0); if ((rlen = write(s, (char *)&m_rtmsg, l)) < 0) { + if (errno == EPERM) + err(1, "writing to routing socket"); warn("writing to routing socket"); return (-1); } |