Author: cy
Date: Thu Apr 11 04:22:06 2019
New Revision: 346114
URL: https://svnweb.freebsd.org/changeset/base/346114

Log:
  Catch up to r343631: Avoid "pfil: duplicate hook" due to
  ipf_check_wrapper and ipf_check_wrapper6 being registered
  under the same pa_rulename.
  
  MFC after:    3 days

Modified:
  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c

Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==============================================================================
--- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Thu Apr 11 04:21:58 
2019        (r346113)
+++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Thu Apr 11 04:22:06 
2019        (r346114)
@@ -1344,13 +1344,14 @@ int ipf_pfil_hook(void) {
        pha.pa_version = PFIL_VERSION;
        pha.pa_flags = PFIL_IN | PFIL_OUT;
        pha.pa_modname = "ipfilter";
-       pha.pa_rulname = "default";
+       pha.pa_rulname = "default-ip4";
        pha.pa_func = ipf_check_wrapper;
        pha.pa_ruleset = NULL;
        pha.pa_type = PFIL_TYPE_IP4;
        V_ipf_inet_hook = pfil_add_hook(&pha);
 
 #ifdef USE_INET6
+       pha.pa_rulname = "default-ip6";
        pha.pa_func = ipf_check_wrapper6;
        pha.pa_type = PFIL_TYPE_IP6;
        V_ipf_inet6_hook = pfil_add_hook(&pha);


_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to