>
> Hello,
>
> I got the following error when i try to compile a new kernel with IPF
> 4.1.11 on FreeBSD 5.4-RELEASE-p11 after applying RWLOCK patch.
..
Patch attached.
Darren
Index: ip_sync.c
===================================================================
RCS file: /devel/CVS/IP-Filter/ip_sync.c,v
retrieving revision 2.40.2.6
diff -c -r2.40.2.6 ip_sync.c
*** ip_sync.c 17 Mar 2006 22:55:37 -0000 2.40.2.6
--- ip_sync.c 19 Mar 2006 13:23:56 -0000
***************
*** 1002,1005 ****
--- 1002,1017 ----
{
return EINVAL;
}
+
+
+ int ipfsync_canread()
+ {
+ return !((sl_tail == sl_idx) && (su_tail == su_idx));
+ }
+
+
+ int ipfsync_canwrite()
+ {
+ return 1;
+ }
#endif /* IPFILTER_SYNC */
Index: ip_sync.h
===================================================================
RCS file: /devel/CVS/IP-Filter/ip_sync.h,v
retrieving revision 2.11.2.2
diff -c -r2.11.2.2 ip_sync.h
*** ip_sync.h 4 Nov 2004 19:29:07 -0000 2.11.2.2
--- ip_sync.h 19 Mar 2006 13:24:08 -0000
***************
*** 111,115 ****
--- 111,117 ----
extern int ipfsync_state __P((synchdr_t *sp, void *data));
extern int ipfsync_read __P((struct uio *uio));
extern int ipfsync_write __P((struct uio *uio));
+ extern int ipfsync_canread __P((void));
+ extern int ipfsync_canwrite __P((void));
#endif /* IP_SYNC */
Index: mlfk_ipl.c
===================================================================
RCS file: /devel/CVS/IP-Filter/mlfk_ipl.c,v
retrieving revision 2.21.2.11
diff -c -r2.21.2.11 mlfk_ipl.c
*** mlfk_ipl.c 12 Mar 2006 14:41:40 -0000 2.21.2.11
--- mlfk_ipl.c 19 Mar 2006 13:22:26 -0000
***************
*** 302,311 ****
break;
case IPL_LOGSYNC :
#ifdef IPFILTER_SYNC
! if ((events & (POLLIN | POLLRDNORM)) && ipfsync_canread(xmin))
revents |= events & (POLLIN | POLLRDNORM);
! if ((events & (POLLOUT | POLLWRNORM)) && ipfsync_canwrite(xmin))
! revents |= events & (POLLOUT | POLLOUTNORM);
#endif
break;
case IPL_LOGSCAN :
--- 302,311 ----
break;
case IPL_LOGSYNC :
#ifdef IPFILTER_SYNC
! if ((events & (POLLIN | POLLRDNORM)) && ipfsync_canread())
revents |= events & (POLLIN | POLLRDNORM);
! if ((events & (POLLOUT | POLLWRNORM)) && ipfsync_canwrite())
! revents |= events & (POLLOUT | POLLWRNORM);
#endif
break;
case IPL_LOGSCAN :