Index: sys/netinet/udp_usrreq.c =================================================================== --- sys/netinet/udp_usrreq.c +++ sys/netinet/udp_usrreq.c @@ -1555,8 +1555,8 @@ KASSERT(inp != NULL, ("udp_set_kernel_tunneling: inp == NULL")); INP_WLOCK(inp); up = intoudpcb(inp); - if ((up->u_tun_func != NULL) || - (up->u_icmp_func != NULL)) { + if ((f != NULL || i != NULL) && ((up->u_tun_func != NULL) || + (up->u_icmp_func != NULL))) { INP_WUNLOCK(inp); return (EBUSY); }