Fix IPv6 route adds on FreeBSD and other BSDs.
authorJohn Hay <jhay@meraka.org.za>
Sat, 4 Apr 2009 07:10:12 +0000 (09:10 +0200)
committerJohn Hay <jhay@meraka.org.za>
Sat, 4 Apr 2009 07:10:12 +0000 (09:10 +0200)
src/bsd/kernel_routes.c

index 1c0892d..20840d4 100644 (file)
@@ -312,7 +312,7 @@ add_del_route6(const struct rt_entry *rt, int add)
 #endif
     memcpy(walker, &sin6, sizeof(sin6));
     walker += sin_size;
-    rtm->rtm_addrs = RTA_GATEWAY;
+    rtm->rtm_addrs |= RTA_GATEWAY;
   }
   else {
     /*
@@ -330,7 +330,7 @@ add_del_route6(const struct rt_entry *rt, int add)
 #endif
     memcpy(walker, &sin6, sizeof(sin6));
     walker += sin_size;
-    rtm->rtm_addrs = RTA_GATEWAY;
+    rtm->rtm_addrs |= RTA_GATEWAY;
     rtm->rtm_flags |= RTF_GATEWAY;
   }