summaryrefslogtreecommitdiffstats
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 3e82866..1e7adb4 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -4973,8 +4973,10 @@ sppp_set_ip_addr(struct sppp *sp, u_long src)
/* set new address */
si->sin_addr.s_addr = htonl(src);
ia = ifatoia(ifa);
+ IN_IFADDR_WLOCK();
LIST_REMOVE(ia, ia_hash);
LIST_INSERT_HEAD(INADDR_HASH(si->sin_addr.s_addr), ia, ia_hash);
+ IN_IFADDR_WUNLOCK();
/* add new route */
error = rtinit(ifa, (int)RTM_ADD, RTF_HOST);
OpenPOWER on IntegriCloud