Projet

Général

Profil

Télécharger (549 octets) Statistiques
| Branche: | Révision:

univnautes-tools / patches / stable / 10 / route.diff @ 2e75006f

1
diff --git a/sbin/route/route.c b/sbin/route/route.c
2
index 6c2bbe2..a2e2056 100644
3
--- a/sbin/route/route.c
4
+++ b/sbin/route/route.c
5
@@ -1518,10 +1518,15 @@ rtmsg(int cmd, int flags, int fib)
6
 		print_rtmsg(&rtm, l);
7
 	if (debugonly)
8
 		return (0);
9
+testagain:
10
 	if ((rlen = write(s, (char *)&m_rtmsg, l)) < 0) {
11
 		if (errno == EPERM)
12
 			err(1, "writing to routing socket");
13
 		warn("writing to routing socket");
14
+		if (rtm.rtm_type == RTM_CHANGE) {
15
+			rtm.rtm_type = RTM_ADD;
16
+			goto testagain;
17
+		}
18
 		return (-1);
19
 	}
20
 	if (cmd == RTM_GET) {
(55-55/64)