summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorMatt Smith <mgsmith@netgate.com>2015-11-18 10:28:48 -0600
committerMatt Smith <mgsmith@netgate.com>2015-11-18 10:28:48 -0600
commit810c74b42db13475e7f7c3e036b6f4d762a2b5a2 (patch)
treec8e7b13c9a6df8b64544b2e9e49d386af32f20e7 /sbin
parent55f03420a4f07553c44fa7955fd05a1b625b14f8 (diff)
downloadFreeBSD-src-810c74b42db13475e7f7c3e036b6f4d762a2b5a2.zip
FreeBSD-src-810c74b42db13475e7f7c3e036b6f4d762a2b5a2.tar.gz
Importing pfSense patch route.diff
Diffstat (limited to 'sbin')
-rw-r--r--sbin/route/route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/route/route.c b/sbin/route/route.c
index 234aeef..b3641ac 100644
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -1554,10 +1554,15 @@ rtmsg(int cmd, int flags, int fib)
print_rtmsg(&rtm, l);
if (debugonly)
return (0);
+testagain:
if ((rlen = write(s, (char *)&m_rtmsg, l)) < 0) {
if (errno == EPERM)
err(1, "writing to routing socket");
warn("writing to routing socket");
+ if (rtm.rtm_type == RTM_CHANGE) {
+ rtm.rtm_type = RTM_ADD;
+ goto testagain;
+ }
return (-1);
}
if (cmd == RTM_GET) {
OpenPOWER on IntegriCloud