From 346b289d245fd8fd2013fb5624a9287c9ae4a49d Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 17 Aug 2015 13:53:10 -0300 Subject: Importing pfSense patch route.diff --- sbin/route/route.c | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.1