On 05/05/2015 08:53 PM, Vadim Kochan wrote: ...
OK, seems this approach fixes the issue, also I checked that all callers of pf_socket uses bind_generic or ring_{rx,tx}_setup which does a bind a socket to a device/proto packet handler:astraceroute.c:893: static int main_trace(struct ctx *ctx) OK netsniff-ng.c:222: static void pcap_to_xmit(struct ctx *ctx) OK netsniff-ng.c:388: receive_to_xmit(struct ctx *ctx) OK netsniff-ng.c:389: receive_to_xmit(struct ctx *ctx) OK netsniff-ng.c:950: recv_only_or_dump(struct ctx *ctx) OK So the fix is simply to use a socket(PF_PACKET, SOCK_RAW, 0) in pf_socket func, as was suggested by Daniel.
Thanks for double-checking! So please feel free to consolidate pf_tx_socket() into pf_socket() for the fix. Btw, this should also improve setup timing. ;) Cheers, Daniel -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
