summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2001-10-01 18:14:49 +0000
committerjlemon <jlemon@FreeBSD.org>2001-10-01 18:14:49 +0000
commit88dd97daaf06f57b5c2719d1f9e6513129cbe689 (patch)
tree8f31e27e16a94d1bc945ef8fb4153dbf4465c1ce /sys/net
parent6bc13e1485487232dfecb823e9f7f225c80a8f3a (diff)
downloadFreeBSD-src-88dd97daaf06f57b5c2719d1f9e6513129cbe689.zip
FreeBSD-src-88dd97daaf06f57b5c2719d1f9e6513129cbe689.tar.gz
Update the hash table when sppp mucks directly with the interface address.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_spppsubr.c4
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);
OpenPOWER on IntegriCloud