File iproute2-libxtables6.diff of Package iproute2

From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-06-01 00:52:29+0200
Upstream: not sent yet

libxtables6 (iptables-1.4.11) had to change the signature of
xtables_merge_options to avoid invoking undefined behavior.

---
 tc/m_xt.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: iproute2-2.6.38/tc/m_xt.c
===================================================================
--- iproute2-2.6.38.orig/tc/m_xt.c
+++ iproute2-2.6.38/tc/m_xt.c
@@ -162,7 +162,8 @@ static int parse_ipt(struct action_util
 					return -1;
 				}
 				tcipt_globals.opts =
-				    xtables_merge_options(tcipt_globals.opts,
+				    xtables_merge_options(tcipt_globals.orig_opts,
+				                          tcipt_globals.opts,
 				                          m->extra_opts,
 				                          &m->option_offset);
 			} else {
@@ -307,7 +308,8 @@ print_ipt(struct action_util *au,FILE *
 			}
 
 			tcipt_globals.opts =
-			    xtables_merge_options(tcipt_globals.opts,
+			    xtables_merge_options(tcipt_globals.orig_opts,
+			                          tcipt_globals.opts,
 			                          m->extra_opts,
 			                          &m->option_offset);
 		} else {
openSUSE Build Service is sponsored by