summaryrefslogtreecommitdiffstats
path: root/sbin/route
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/route')
-rw-r--r--sbin/route/route.c4
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);
}
OpenPOWER on IntegriCloud