[PATCH] Fix for PPP activ/passiv filter
From: Karsten Keil <kkeil@suse.de> I found a bug in the PPPIOCSPASS PPPIOCSACTIVE IOCTL implementation in kernel 2.5/2.6. The current pppd code use a empty filter (uprog.len=0) to detach the filter in the kernel, but this code was removed in 2.5.71 while fixing a compiler warning. Here the new patch, also with better limit checking. The second patch check for flen == 0 in the filter check too, since later in this code a filter[flen - 1] access is done, which is not so funny with flen 0. Maybe it's not really needed anymore, since with the first patch it would not longer called with flen=0. paulus says: It looks correct. Previously we had (and in 2.4 we still have) if (uprog.len > 0 && uprog.len < 65536) { ... which gave warnings since uprog.len is unsigned short. So someone decided that both parts of the condition were redundant.
Showing
Please register or sign in to comment