summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/i4b/driver/i4b_ispppsubr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/i4b/driver/i4b_ispppsubr.c b/sys/i4b/driver/i4b_ispppsubr.c
index 3e47912..b6f764e 100644
--- a/sys/i4b/driver/i4b_ispppsubr.c
+++ b/sys/i4b/driver/i4b_ispppsubr.c
@@ -4294,6 +4294,9 @@ sppp_set_ip_addr(struct sppp *sp, u_long src)
" failed, error=%d\n", SPP_ARGS(ifp), error);
}
#else
+#if __FreeBSD_version >= 500023
+ struct in_ifaddr *ia = ifatoia(ifa);
+#endif
/* delete old route */
error = rtinit(ifa, (int)RTM_DELETE, RTF_HOST);
if(debug && error)
@@ -4304,7 +4307,10 @@ sppp_set_ip_addr(struct sppp *sp, u_long src)
/* set new address */
si->sin_addr.s_addr = htonl(src);
-
+#if __FreeBSD_version >= 500023
+ LIST_REMOVE(ia, ia_hash);
+ LIST_INSERT_HEAD(INADDR_HASH(si->sin_addr.s_addr), ia, ia_hash);
+#endif
/* add new route */
error = rtinit(ifa, (int)RTM_ADD, RTF_HOST);
if (debug && error)
OpenPOWER on IntegriCloud