Thank you!

The attached patch to sys/kern/uipc_socket.c worked.
I will file a bug report later.

2014-09-02 9:49 GMT+09:00 Garrett Cooper <yaneurab...@gmail.com>:
> Is bpf built into the kernel, or is it built and loaded as a module. I'm 
> wondering because an issue with vimage and socket "hook" support was resolved 
> in an earlier revision, but this might not have been caught:
> http://svnweb.freebsd.org/base?view=revision&revision=270318
> Cheers,
> -Garrett
Index: uipc_socket.c
===================================================================
--- uipc_socket.c       (revision 270837)
+++ uipc_socket.c       (working copy)
@@ -3265,9 +3265,11 @@
                        return 1;
        }
 
+       CURVNET_SET(so->so_vnet);
        if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0)
                /* This hook returning non-zero indicates an event, not error */
                return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD));
+       CURVNET_RESTORE();
        
        return (0);
 }
@@ -3294,8 +3296,10 @@
        SOCKBUF_LOCK_ASSERT(&so->so_snd);
        kn->kn_data = sbspace(&so->so_snd);
 
+       CURVNET_SET(so->so_vnet);
        if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0)
                hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE);
+       CURVNET_RESTORE();
 
        if (so->so_snd.sb_state & SBS_CANTSENDMORE) {
                kn->kn_flags |= EV_EOF;
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to