diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2007-07-30 14:32:26 +0000 |
---|---|---|
committer | Yasuyuki KOZAKAI <yasuyuki@netfilter.org> | 2007-07-30 14:32:26 +0000 |
commit | d01454062d0265f118c1b721740997cb93ef8cdb (patch) | |
tree | bfa8ab2b178a18d02b6d634ebf38ec3aecac4c56 /iptables.c | |
parent | 6f1c597f2aef128e35a78717a998fed7567ade2c (diff) |
Makes it possible to omit extra_opts of matches/targets if unnecessary.
(Jan Engelhardt <jengelh@gmx.de>)
A nice side effect is that merge_option() doesn't copy options in that case.
Diffstat (limited to 'iptables.c')
-rw-r--r-- | iptables.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -853,6 +853,9 @@ merge_options(struct option *oldopts, const struct option *newopts, unsigned int num_old, num_new, i; struct option *merge; + if (newopts == NULL) + return oldopts; + for (num_old = 0; oldopts[num_old].name; num_old++); for (num_new = 0; newopts[num_new].name; num_new++); |