diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -295,12 +295,6 @@ ifp->if_dunit = IF_DUNIT_NONE; sc->encap_cookie = ip_encap_attach(&ipv4_encap_cfg, sc, M_WAITOK); - if (sc->encap_cookie == NULL) { - if_printf(ifp, "attach failed\n"); - free(sc, M_STF); - ifc_free_unit(ifc, unit); - return (ENOMEM); - } ifp->if_mtu = IPV6_MMTU; ifp->if_ioctl = stf_ioctl; diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -2821,11 +2821,6 @@ &pim_squelch_wholepkt); pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); - if (pim_encap_cookie == NULL) { - printf("ip_mroute: unable to attach pim encap\n"); - MRW_LOCK_DESTROY(); - return (EINVAL); - } ip_mcast_src = X_ip_mcast_src; ip_mforward = X_ip_mforward;