diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2021-01-30 21:52:44 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2021-01-30 23:25:57 +0000 |
commit | dd9163003cb1be494609d904521e8dae7737caa7 (patch) | |
tree | 34e3b45e98f066582b4572e3089bd8e9ee30c0d6 /sys/net/route/route_ctl.h | |
parent | ab6d9aaed76ed9f86fd0d938ebb6ea81f5ad6a82 (diff) | |
download | src-dd9163003cb1be494609d904521e8dae7737caa7.tar.gz src-dd9163003cb1be494609d904521e8dae7737caa7.zip |
Add rib_subscribe_locked() and rib_unsubsribe_locked() to support
subscriptions during RIB modifications.
Add new subscriptions to the beginning of the lists instead of
the end. This fixes the situation when new subscription is created
int the callback for the existing subscription, leading to the
subscription notification handler pick it.
MFC after: 3 days
Diffstat (limited to 'sys/net/route/route_ctl.h')
-rw-r--r-- | sys/net/route/route_ctl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h index ecbc9ee91dc0..bd256e9f0834 100644 --- a/sys/net/route/route_ctl.h +++ b/sys/net/route/route_ctl.h @@ -144,6 +144,9 @@ struct rib_subscription *rib_subscribe(uint32_t fibnum, int family, struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh, rib_subscription_cb_t *f, void *arg, enum rib_subscription_type type, bool waitok); +struct rib_subscription *rib_subscribe_locked(struct rib_head *rnh, + rib_subscription_cb_t *f, void *arg, enum rib_subscription_type type); void rib_unsibscribe(struct rib_subscription *rs); +void rib_unsibscribe_locked(struct rib_subscription *rs); #endif |