When a ng_tty node receives a byte or packet from the device, it sends
the data up through its hook. Once it makes its way up to an ng_iface
node, it gets dispatched through netisr, so the thread must have a VNET
context set.
By default ng_tty will use direct dispatch, i.e., the thread calling the
TTY hook will pass packets all the way up to netisr. However, it does
not set a VNET context, so in this case we crash.
Work around the problem by queueing all packets through netgraph worker
threads, which do set the vnet context appropriately. This is obviously
not an optimal solution, but I am not sure how we can derive the correct
vnet in TTY. If someone more familiar with netgraph than me can suggest
something, I'd appreciate it. In the meantime, this diff ensures that
ng_tty is not totally broken when VIMAGE is enabled.