diff options
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 1c1ab7f..7c8cbc5 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -4545,6 +4545,7 @@ sppp_set_ip_addr(struct sppp *sp, u_long src) STDDCL; struct ifaddr *ifa; struct sockaddr_in *si; + struct in_ifaddr *ia; /* * Pick the first AF_INET address from the list, @@ -4595,6 +4596,9 @@ sppp_set_ip_addr(struct sppp *sp, u_long src) /* set new address */ si->sin_addr.s_addr = htonl(src); + ia = ifatoia(ifa); + LIST_REMOVE(ia, ia_hash); + LIST_INSERT_HEAD(INADDR_HASH(si->sin_addr.s_addr), ia, ia_hash); /* add new route */ error = rtinit(ifa, (int)RTM_ADD, RTF_HOST); |