static int pfsocket(int ver)
 {
-       int ret, sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
+       int ret, sock = socket(PF_PACKET, SOCK_RAW, 0);
        if (sock == -1) {
                perror("socket");
                exit(1);
        bug_on(ring->type != PACKET_RX_RING);
 
        pair_udp_open(udp_sock, PORT_BASE);
-       pair_udp_setfilter(sock);
 
        memset(&pfd, 0, sizeof(pfd));
        pfd.fd = sock;
        bug_on(ring->type != PACKET_RX_RING);
 
        pair_udp_open(udp_sock, PORT_BASE);
-       pair_udp_setfilter(sock);
 
        memset(&pfd, 0, sizeof(pfd));
        pfd.fd = sock;
 {
        int ret;
 
+       pair_udp_setfilter(sock);
+
        ring->ll.sll_family = PF_PACKET;
        ring->ll.sll_protocol = htons(ETH_P_ALL);
        ring->ll.sll_ifindex = if_nametoindex("lo");