diff options
-rw-r--r-- | sys/net/if_tun.c | 6 | ||||
-rw-r--r-- | sys/net/if_tunvar.h | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index aaea10c..e605002 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -273,7 +273,7 @@ tunopen(dev_t dev, int flag, int mode, struct thread *td) tp = dev->si_drv1; } KASSERT(!(tp->tun_flags & TUN_OPEN), ("Resource & flags out-of-sync")); - tp->r_unit = r; + tp->tun_unit = r; tp->tun_pid = td->td_proc->p_pid; ifp = &tp->tun_if; tp->tun_flags |= TUN_OPEN; @@ -297,7 +297,7 @@ tunclose(dev_t dev, int foo, int bar, struct thread *td) tp = dev->si_drv1; ifp = &tp->tun_if; - KASSERT(tp->r_unit, ("Unit %d not marked open", ifp->if_unit)); + KASSERT(tp->tun_unit, ("Unit %d not marked open", ifp->if_unit)); tp->tun_flags &= ~TUN_OPEN; tp->tun_pid = 0; @@ -329,7 +329,7 @@ tunclose(dev_t dev, int foo, int bar, struct thread *td) selwakeup(&tp->tun_rsel); TUNDEBUG ("%s%d: closed\n", ifp->if_name, ifp->if_unit); - err = rman_release_resource(tp->r_unit); + err = rman_release_resource(tp->tun_unit); KASSERT(err == 0, ("Unit %d failed to release", ifp->if_unit)); return (0); diff --git a/sys/net/if_tunvar.h b/sys/net/if_tunvar.h index d49213f..cda53f0 100644 --- a/sys/net/if_tunvar.h +++ b/sys/net/if_tunvar.h @@ -47,10 +47,9 @@ struct tun_softc { struct ifnet tun_if; /* the interface */ struct sigio *tun_sigio; /* information for async I/O */ struct selinfo tun_rsel; /* read select */ - struct selinfo tun_wsel; /* write select (not used) */ struct tun_softc *next; /* Next softc in list */ - struct resource *r_unit; /* resource allocated for this unit */ + struct resource *tun_unit; /* resource allocated for this unit */ }; #endif /* !_NET_IF_TUNVAR_H_ */ |