[Click] KernelFilter patch

Eddie Kohler kohler at cs.ucla.edu
Sat Oct 30 15:35:48 EDT 2010


Humiliating!  Thanks for the fix; it is committed.

Eddie


On 10/29/2010 04:39 PM, Beyers Cronje wrote:
> Hi guys,
>
> The patch below fixes a bug in KernelFilter::device_filter. As per access()
> man page, on success (all requested permissions granted), zero is returned.
>
> Beyers
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> --- kernelfilter.cc.orig        2010-10-30 00:46:31.973642384 +0200
> +++ kernelfilter.cc     2010-10-30 00:56:48.449641054 +0200
> @@ -85,9 +85,9 @@
>       StringAccum cmda;
>       if (iptables_command)
>          cmda<<  iptables_command;
> -    else if (access("/sbin/iptables", X_OK))
> +    else if (access("/sbin/iptables", X_OK) == 0)
>          cmda<<  "/sbin/iptables";
> -    else if (access("/usr/sbin/iptables", X_OK))
> +    else if (access("/usr/sbin/iptables", X_OK) == 0)
>          cmda<<  "/usr/sbin/iptables";
>       else
>          return errh->error("no %<iptables%>  executable found");
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list