[netflow-tools] [PATCH] Support softflowd listening on "any" interface

Hitoshi Irino irino at sfc.wide.ad.jp
Mon Oct 10 19:45:25 EST 2011


Hello Christoph,

I committed (hg commit & push) this patch to google code on September 21th.

thanks,
Hitoshi Irino

(2011年02月07日 08:25), Christoph Biedl wrote:
> Hello,
> 
> I tried to make softflowd listen on all interfaces, which is at least
> possible on Linux kernels using "any" as the interface name. This,
> however, caused softflowd to exit after a few seconds with a "Shutting
> down after pcap EOF" message.
> 
> It seems poll (softflowd.c:1902) sometimes sets pl[0].revents without
> actually packets available, thus causing pcap_dispatch to return zero.
> 
> That patch below tries to deal with this by not leaving the main loop
> in that situation while reading from a live capture. Works for me, but
> please review.
> 
> Regards,
> 
>      Christoph
> 
> --- a/softflowd.c
> +++ b/softflowd.c
> @@ -1924,7 +1924,7 @@ main(int argc, char **argv)
>                                  logit(LOG_ERR, "Exiting on pcap_dispatch: %s",
>                                      pcap_geterr(pcap));
>                                  break;
> -                       } else if (r == 0) {
> +                       } else if (r == 0&&  capfile != NULL) {
>                                  logit(LOG_NOTICE, "Shutting down after "
>                                      "pcap EOF");
>                                  graceful_shutdown_request = 1;
> 
> 
> 
> 
> _______________________________________________
> netflow-tools mailing list
> netflow-tools at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/netflow-tools



More information about the netflow-tools mailing list