Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfilter on AIX doesn't support more than 68 IP's in a single ip-pool #3

Open
bshreyas1 opened this issue Jan 24, 2018 · 2 comments
Open

Comments

@bshreyas1
Copy link

When the number of IP address entries in an ippool crosses 68, then we ipfilter is unable to create this ippool.
As per IBM support: This issue is related to yacc compiler.
Yacc compiler does not have the ability to read a high number of tokens at the same time(as large number of ippools are created).

Reported on ipfilter version:
bash-4.4# ipf -V
ipf: IP Filter: v4.1.13 (480)
Kernel: IP Filter: v4.1.13

@davemq
Copy link
Collaborator

davemq commented Jan 25, 2018

Have you tried using any of yacc's options for larger grammars? The AIX yacc man page has these options:

-NnNumber
        Changes the size of the token and nonterminal names array to Number. The default value is 8000. Valid values are only those greater than 8000.
-NmNumber
        Changes the size of the memory states array to Number. Default value is 40000. Valid values are only those greater than 40000.
-NrNumber
        Changes the internal buffer sizes to handle large grammars. The default value is 2000. Valid values are only those greater than 2000.

Maybe try -Nr2500 when using yacc. I think you may need to do something like make YACC='yacc -Nr2500'. You might also need to force make to work by deleting *.o files.

@ishyiko
Copy link

ishyiko commented Jan 6, 2022

diff --git a/usr/sbin/ippool_y.y b/usr/sbin/ippool_y.y
index 89c4f04..d76530c 100644
--- a/usr/sbin/ippool_y.y
+++ b/usr/sbin/ippool_y.y
@@ -49,6 +49,10 @@
 #include "kmem.h"
 
 #define	YYDEBUG	1
+//  YYMAXDEPTH is the maximum size the stacks can grow to
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 0x000fffff
+#endif
 
 extern	int	yyparse __P((void));
 extern	int	yydebug;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants