summaryrefslogtreecommitdiffstats
path: root/iptables/xtoptions.c
Commit message (Collapse)AuthorAgeFilesLines
* build: restore build order of modulesJan Engelhardt2011-09-191-1171/+0
| | | | | | | | iptables(exe) requires libext.a, but extensions/ require libxtables.la (in iptables/). This circular dependency does not work out, so separate libxtables into its own directory and put it in front. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* xtoptions: fill in fallback value for nvalsJan Engelhardt2011-08-271-0/+6
| | | | | | | | | | | | | Parsing for libxt_conntrack rev 2 is done by using rev 2's option structure, which specifies XTTYPE_PORT, and using rev 3's parser skeleton, which uses cb->nvals. Reading cb->nvals when not using XTTYPE_PORTRC (or any other multi-value type) is undefined behavior. Make it defined. Since XTTYPE_NONE is the only type that can take void, nvals logically ought to be 1. References: http://marc.info/?l=netfilter-devel&m=131370592105298&w=2 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* xtoptions: flag use of XTOPT_POINTER without XTOPT_PUTJan Engelhardt2011-08-211-1/+7
| | | | | | | When XTOPT_POINTER is used (and yields a non-zero offsetof), we can flag the absence of XTOPT_PUT. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* build: strengthen check for overlong lladdr componentsJan Engelhardt2011-08-011-2/+2
| | | | | | | | | | | | | | | ethermac[i] > UINT8_MAX is quite pointless, because ethermac[i] is just uint8_t. To catch values that are not in the range "00"-"ff", use a string length check (end-arg>2). I am willingly using 2 there, because no one is going to specify an Ethernet LL address as "0x00:0x24:0xbe:0xc2:0x7f:0x16" -- because it is always interpreted as hexadecimal anyway even without the 0x prefix. xtoptions.c: In function "xtopt_parse_ethermac": xtoptions.c:760:3: warning: comparison is always false due to limited range of data type xtoptions.c:766:2: warning: comparison is always false due to limited range of data type Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* extensions: support for per-extension instance "global" variable spaceJan Engelhardt2011-06-211-0/+4
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* src: move all iptables pieces into a separate directoryJan Engelhardt2011-06-071-0/+1155
(Unclutter top-level dir) Signed-off-by: Jan Engelhardt <jengelh@medozas.de>