Bjoern A. Zeeb 05fc416403 During if_vmove() we call if_detach_internal() which in turn calls the event
handler notifying about interface departure and one of the consumers will
detach if_bpf.
There is no way for us to re-attach this easily as the DLT and hdrlen are
only given on interface creation.
Add a function to allow us to query the DLT and hdrlen from a current
BPF attachment and after if_attach_internal() manually re-add the if_bpf
attachment using these values.

Found by panics triggered by nd6 packets running past BPF_MTAP() with no
proper if_bpf pointer on the interface.

Also add a basic DDB show function to investigate the if_bpf attachment
of an interface.

Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5896
2016-04-11 10:00:38 +00:00
..
2015-08-24 23:40:36 +00:00
2015-09-10 05:59:39 +00:00
2015-10-03 09:15:23 +00:00
2015-04-21 10:35:23 +00:00
2015-04-07 21:31:17 +00:00
2015-12-16 09:18:20 +00:00
2016-04-05 00:09:19 +00:00
2016-03-24 11:40:10 +00:00
2016-03-24 11:40:10 +00:00
2016-02-03 11:49:51 +00:00