diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index fb81960d1c60..c5da47c9c523 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -169,7 +169,7 @@ gif_clone_create(ifc, unit) sc->encap_cookie4 = sc->encap_cookie6 = NULL; #ifdef INET - sc->encap_cookie4 = encap_attach_func(AF_INET, -1, + sc->encap_cookie4 = encap_attach_func(AF_INET, IPPROTO_IPV4, gif_encapcheck, (struct protosw*)&in_gif_protosw, sc); if (sc->encap_cookie4 == NULL) { printf("%s: unable to attach encap4\n", if_name(&sc->gif_if)); @@ -178,7 +178,7 @@ gif_clone_create(ifc, unit) } #endif #ifdef INET6 - sc->encap_cookie6 = encap_attach_func(AF_INET6, -1, + sc->encap_cookie6 = encap_attach_func(AF_INET6, IPPROTO_IPV6, gif_encapcheck, (struct protosw *)&in6_gif_protosw, sc); if (sc->encap_cookie6 == NULL) { if (sc->encap_cookie4) { diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 8da8339e2ad6..b0f2eab882db 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -768,7 +768,7 @@ add_vif(vifcp) * to encapsulated packets. */ if (encap_cookie == NULL) { - encap_cookie = encap_attach_func(AF_INET, -1, + encap_cookie = encap_attach_func(AF_INET, IPPROTO_IPV4, mroute_encapcheck, (struct protosw *)&mroute_encap_protosw, NULL);