net/core/filter.c

Thomas Sailer (sailer@ife.ee.ethz.ch)
Sat, 27 Dec 1997 17:36:28 +0100


The current LSF seems to be quite broken
wrt. error handling...

in sk_attach_filter:

if((err = sk_chk_filter(fprog->filter, fprog->len)))

seems to indicate that sk_chk_filter is intended to return
0 on error, != 0 on success.

The following return (err); however would return 0 in the
error case.

sk_chk_filter itself follows the 0 on error semantics at its end
return (BPF_CLASS(filter[flen - 1].code) == BPF_RET);
but has a few return -EINVAL; in its body...

Tom