All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iptables: xtables-eb: Remove const qualifier from struct option
@ 2017-11-30 13:48 Varsha Rao
  2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
  2017-11-30 14:03 ` [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Varsha Rao @ 2017-11-30 13:48 UTC (permalink / raw)
  To: Pablo Neira Ayuso, netfilter-devel; +Cc: Varsha Rao

As opts is reassigned multiple times, it cannot be made constant.
So remove const qualifier from structure option. This patch fixes the
following warning.

xtables-eb.c: In function ‘ebt_load_match_extensions’:
xtables-eb.c:653:7: warning: assignment discards ‘const’ qualifier
from pointer target type
  opts = ebt_original_options;

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 iptables/xtables-eb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 60ec935c..c8b5d4f3 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -247,7 +247,7 @@ static int get_current_chain(const char *chain)
 
 /* Default command line options. Do not mess around with the already
  * assigned numbers unless you know what you are doing */
-static const struct option ebt_original_options[] =
+static struct option ebt_original_options[] =
 {
 	{ "append"         , required_argument, 0, 'A' },
 	{ "insert"         , required_argument, 0, 'I' },
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges.
  2017-11-30 13:48 [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Varsha Rao
@ 2017-11-30 13:48 ` Varsha Rao
  2017-11-30 14:04   ` Pablo Neira Ayuso
  2017-11-30 14:03 ` [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Pablo Neira Ayuso
  1 sibling, 1 reply; 4+ messages in thread
From: Varsha Rao @ 2017-11-30 13:48 UTC (permalink / raw)
  To: Pablo Neira Ayuso, netfilter-devel; +Cc: Varsha Rao

This patch adds test case for invalid MSS range.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 extensions/libxt_tcpmss.t | 1 +
 1 file changed, 1 insertion(+)

diff --git a/extensions/libxt_tcpmss.t b/extensions/libxt_tcpmss.t
index 3181e49d..2b415957 100644
--- a/extensions/libxt_tcpmss.t
+++ b/extensions/libxt_tcpmss.t
@@ -3,3 +3,4 @@
 -p tcp -m tcpmss --mss 42;=;OK
 -p tcp -m tcpmss --mss 42:12345;=;OK
 -p tcp -m tcpmss --mss 42:65536;;FAIL
+-p tcp -m tcpmss --mss 65535:1000;;FAIL
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iptables: xtables-eb: Remove const qualifier from struct option
  2017-11-30 13:48 [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Varsha Rao
  2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
@ 2017-11-30 14:03 ` Pablo Neira Ayuso
  1 sibling, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-30 14:03 UTC (permalink / raw)
  To: Varsha Rao; +Cc: netfilter-devel

On Thu, Nov 30, 2017 at 07:18:05PM +0530, Varsha Rao wrote:
> As opts is reassigned multiple times, it cannot be made constant.
> So remove const qualifier from structure option. This patch fixes the
> following warning.
> 
> xtables-eb.c: In function ‘ebt_load_match_extensions’:
> xtables-eb.c:653:7: warning: assignment discards ‘const’ qualifier
> from pointer target type
>   opts = ebt_original_options;

Applied, thanks Varsha.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges.
  2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
@ 2017-11-30 14:04   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-30 14:04 UTC (permalink / raw)
  To: Varsha Rao; +Cc: netfilter-devel

On Thu, Nov 30, 2017 at 07:18:06PM +0530, Varsha Rao wrote:
> This patch adds test case for invalid MSS range.

Also applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-30 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30 13:48 [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Varsha Rao
2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
2017-11-30 14:04   ` Pablo Neira Ayuso
2017-11-30 14:03 ` [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.