#!/bin/sh
# DF-3486 trigger: ng_eiface node creation -> if_attach() from netisr ->
# panic: try holding ifnet lock in netisr.  (ng_iface hits the same defect
# at its own if_attach call once DF-3485 is fixed.)
# Must run as root (netgraph control socket requires SYSCAP_RESTRICTEDROOT).
set -e
kldload ng_socket
kldload ng_eiface
echo "[+] triggering ng_eiface node creation (stock kernel: instant panic expected)"
ngctl mkpeer . eiface e0 ether
echo "[!] no panic? unexpected on stock kernel"
