summaryrefslogtreecommitdiffstats
path: root/lib/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix build with NDEBUG definedJozsef Kadlecsik2011-01-181-2/+2
| | | | | | | | | | | | | | | | The usage of the gcc option -Wunused-parameter interferes badly with the assert() macros. In case -DNDEBUG is specified build fails with: cc1: warnings being treated as errors print.c: In function 'ipset_print_family': print.c:92: error: unused parameter 'opt' print.c: In function 'ipset_print_port': print.c:413: error: unused parameter 'opt' print.c: In function 'ipset_print_proto': Fix it by taking into accout NDEBUG in the function arguments. Bug reported by Holger Eitzenberger.
* Make IPv4 and IPv6 address handling similarJozsef Kadlecsik2011-01-181-1/+10
| | | | | | | | | | | | | | | | While the following works for AF_INET: ipset add foo 192.168.1.1/32 this does not work for AF_INET6: ipset add foo6 20a1:1:2:3:4:5:6:7/128 ipset v5.2: Syntax error: plain IP address must be supplied: 20a1:1:2:3:4:5:6:7/128 Bug reported by Holger Eitzenberger. The complete fix is to handle the special host prefixes in the general IP address parser function.
* Use cast to void * instead of memcpy as Sparc workaround at sockaddr_XXX.Jozsef Kadlecsik2010-12-231-8/+6
| | | | | | Direct cast results "cast increases required alignment of target type" on Sparc: use indirect cast to void * instead of memcpy, as Jan Engelhardt suggested.
* libipset: const annotationsJan Engelhardt2010-12-191-1/+1
|
* libipset: remove redundant castsJan Engelhardt2010-12-191-4/+4
|
* Put back the Sparc specific workaround at getaddrinfo.Jozsef Kadlecsik2010-12-191-4/+8
|
* Add ipset_parse_tcpudp_port functionJozsef Kadlecsik2010-12-171-7/+27
| | | | Add new parser function to parse TCP/UDP port name, number, or range of them.
* Add parser function to handle IPv4 and IPv6 differently.Jozsef Kadlecsik2010-10-301-0/+40
| | | | | | At present IPv6 does not support adding/deleting multiple IPv6 addresses specified as an ip-ip range or ip/prefix block. A parser function is added by which can enforce it at parsing the address pattern.
* Fixes, cleanups, commentsv5.0-pre8Jozsef Kadlecsik2010-10-241-131/+282
| | | | | | | | | | | | | | | | | | | - More comments added to the code - ICMP and ICMPv6 support added to the hash:ip,port, hash:ip,port,ip and hash:ip,port,net types - hash:net and hash:ip,port,net types are reworked - hash:net,port type added - Wrong direction parameters fixed in hash:ip,port - Helps and manpage are updated - More tests added - Ugly macros are rewritten to functions in parse.c (Holger Eitzenberger) - resize related bug in hash types fixed (Holger Eitzenberger) - autoreconf patches by Jan Engelhardt applied - netlink patch minimalized: dumping can be initialized by a second parsing of the message (thanks to David and Patrick for the suggestion) - IPv4/IPv6 address attributes are introduced in order to fix the context (suggested by David)
* ipset 5: Sparc related and compatibility fixesv5.0-pre5Jozsef Kadlecsik2010-06-291-6/+8
| | | | | | | | ipset 5 is tested on Sparc, which revealed some compatibility issues and those are fixed. Kernels from 2.6.31 onward are supported. The testsuite checkings are completed to run match/target checks. The README file is updated to reflect the requirements to install and run ipset 5.
* ipset 5: last new feature addedv5.0-pre3Jozsef Kadlecsik2010-06-221-0/+83
| | | | | | | | | | | - the hash types can now store protocol together port, not only port - lots of fixes everywhere: parser, error reporting, manpage The last bits on the todo list before announcing ipset 5: - recheck all the error messages - add possibly more tests - polish manpage
* configure/Makefile and debug fixesJozsef Kadlecsik2010-06-161-0/+4
|
* ipset 5 in an almost ready state - milestonev5.0-pre1Jozsef Kadlecsik2010-06-151-94/+355
| | | | | | | | | | | | Reworked protocol and internal interfaces, missing set types added, backward compatibility verified, lots of tests added (and thanks to the tests, bugs fixed), even the manpage is rewritten ;-). Countless changes everywhere... The missing bits before announcing ipset 5: - net namespace support - new iptables/ip6tables extension library - iptables/ip6tables match and target tests (backward/forward compatibility) - tests on catching syntax errors
* Fourth stage to ipset-5Jozsef Kadlecsik2010-04-221-0/+963
Add new userspace files: include/, lib/ and plus new files in src/.