path: root/ip6tables.c
diff options
author/C=JP/ST=JP/CN=Yasuyuki Kozakai/ </C=JP/ST=JP/CN=Yasuyuki Kozakai/>2007-07-30 14:32:26 +0000
committer/C=JP/ST=JP/CN=Yasuyuki Kozakai/ </C=JP/ST=JP/CN=Yasuyuki Kozakai/>2007-07-30 14:32:26 +0000
commit2c586fbb6ac21fbfeb289df21d47c8726220422f (patch)
treebfa8ab2b178a18d02b6d634ebf38ec3aecac4c56 /ip6tables.c
parent496dc56db37b1e23cf4368cf61050a4cdcf1885a (diff)
Makes it possible to omit extra_opts of matches/targets if unnecessary.
(Jan Engelhardt <>) A nice side effect is that merge_option() doesn't copy options in that case.
Diffstat (limited to 'ip6tables.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/ip6tables.c b/ip6tables.c
index 8f8c2c2..0f96981 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -815,6 +815,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++);