diff options
author | zec <zec@FreeBSD.org> | 2011-06-07 20:46:03 +0000 |
---|---|---|
committer | zec <zec@FreeBSD.org> | 2011-06-07 20:46:03 +0000 |
commit | 5bdda7f91b10ca46468c2c8773e9f861a6d5e8ad (patch) | |
tree | 98d96445ad1c57672214ff1764a441f0a8e3cf15 /sys/net/bridgestp.c | |
parent | f6cfb7359dc65080027581c9099b39284c5d3d50 (diff) | |
download | FreeBSD-src-5bdda7f91b10ca46468c2c8773e9f861a6d5e8ad.zip FreeBSD-src-5bdda7f91b10ca46468c2c8773e9f861a6d5e8ad.tar.gz |
Set curvnet context in a callout-trigerred code path.
MFC after: 3 days
Diffstat (limited to 'sys/net/bridgestp.c')
-rw-r--r-- | sys/net/bridgestp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index 2993838..e263b0b 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -1860,6 +1860,8 @@ bstp_tick(void *arg) if (bs->bs_running == 0) return; + CURVNET_SET(bs->bs_vnet); + /* slow timer to catch missed link events */ if (bstp_timer_expired(&bs->bs_link_timer)) { LIST_FOREACH(bp, &bs->bs_bplist, bp_next) @@ -1893,6 +1895,8 @@ bstp_tick(void *arg) bp->bp_txcount--; } + CURVNET_RESTORE(); + callout_reset(&bs->bs_bstpcallout, hz, bstp_tick, bs); } @@ -2126,6 +2130,7 @@ bstp_attach(struct bstp_state *bs, struct bstp_cb_ops *cb) bs->bs_protover = BSTP_PROTO_RSTP; bs->bs_state_cb = cb->bcb_state; bs->bs_rtage_cb = cb->bcb_rtage; + bs->bs_vnet = curvnet; getmicrotime(&bs->bs_last_tc_time); |