summaryrefslogtreecommitdiff
path: root/sys/net/if_pppx.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-11-08 07:16:30 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-11-08 07:16:30 +0000
commitcc9483a80803855ffa3376b13ebbd8b6e388cee1 (patch)
tree837221515cc522324b695dbd52708970926136b6 /sys/net/if_pppx.c
parent49a5ca10756fe16735beacb0938189fe6b04b0e6 (diff)
convert interface address change hooks to tasks and a task_list.
this follows what's been done for detach and link state hooks, and makes handling of hooks generally more robust. address hooks are a bit different to detach/link state hooks in that there's only a few things that register hooks (carp, pf, vxlan), but a lot of places to run the hooks (lots of ipv4 and ipv6 address configuration). an address hook cookie was in struct pfi_kif, which is part of the pf abi. rather than break pfctl -sI, this maintains the void * used for the cookie and uses it to store a task, which is then used as intended with the new api.
Diffstat (limited to 'sys/net/if_pppx.c')
-rw-r--r--sys/net/if_pppx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c
index 9485e513407..0bd206b1e8d 100644
--- a/sys/net/if_pppx.c
+++ b/sys/net/if_pppx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppx.c,v 1.68 2019/06/24 13:43:19 mpi Exp $ */
+/* $OpenBSD: if_pppx.c,v 1.69 2019/11/08 07:16:29 dlg Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -919,7 +919,7 @@ pppx_add_session(struct pppx_dev *pxd, struct pipex_session_req *req)
printf("pppx: unable to set addresses for %s, error=%d\n",
ifp->if_xname, error);
} else {
- dohooks(ifp->if_addrhooks, 0);
+ if_addrhooks_run(ifp);
}
rw_enter_write(&pppx_ifs_lk);
pxi->pxi_ready = 1;