To remove complexity of code the function is added in nfnetlink.h
to make code more clear and readable.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
include/linux/netfilter/nfnetlink.h | 6 ++
net/netfilter/nf_conntrack_netlink.c | 12 +++-
2 files c
Rmoved parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script was used to fix this
issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilte
To remove complexity of code the function is added in nfnetlink.h
to make code more clear and readable.
This is opencoded in a way that makes it error prone for future
netfilter netlink subsystems.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
changes in v2
- make the
To remove complexity of code the function is added in nfnetlink.h
to make code more clear and readable.
This is opencoded in a way that makes it error prone for future
netfilter netlink subsystems.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
changes in v3
This patch removes typedefs from struct and renames it from "typedef struct
bitstr_t" to "struct bitstr" as per kernel coding standards."
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_h323_asn1.c | 80 +++
Rmoved parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script was used to fix this
issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilte
This patch removes typedefs from struct and renames it from "typedef struct
field_t" to "struct field" as per kernel coding standards."
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_h323_asn1.c | 68 +++
Remove assignments in if condition as reported by checkpatch.pl.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
change in v2
*remove the error.
extensions/libebt_ip.c | 9 ++---
extensions/libip6t_ipv6header.c | 5 +++--
2 files changed, 9 insertions
This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Arushi
type tn.td;
identifier tn.i;
@@
-td
+ struct i
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libebt_log.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/libebt_log.c b/extensions/libebt_log.c
index 0799185..f170af0 100644
Solve the checkpatch issue:
space prohibited before close parenthesis ')'
space prohibited after open parenthesis '('
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libip6t_ah.c | 4 ++--
extensions/libip6t_dst.c | 6 +++---
extensions/libip6t_hbh.c | 6 +++
This patch add or remove unnecessary spaces as reported by
checkpatch.pl.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libebt_802_3.c | 4 ++--
extensions/libip6t_dst.c| 8
extensions/libip6t_hbh.c| 8
exte
Removed parenthesis on the right hand side of assignment, as they are
not required.
The following coccinelle script was used to fix this issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libebt_
This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Arushi
Add blank line after declaration as reported by checkpatch.pl.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libip6t_mh.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/extensions/libip6t_mh.c b/extensions/libip6t_mh.c
index f4c0fd9..ee17182
Add spaces around operator and remove trailing whitespaces.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/dscp_helper.c| 2 +-
extensions/libarpt_mangle.c | 2 +-
extensions/libip6t_ah.c | 2 +-
extensions/libip6t_dst.c| 6 +++---
exte
Remove assignments in if condition as reported by checkpatch.pl.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libebt_ip.c | 11 ++-
extensions/libip6t_ipv6header.c | 5 +++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff
Fix checkpatch warnings:
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/netfilter/ip6_tables.c | 16
1 file changed, 8 insertions
Fixed coding style for null comparisons to be more
consistant with the rest of the kernel coding style.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/bridge/netfilter/ebt_among.c | 12 ++--
net/bridge/netfilter/ebt_arp.c | 10 +
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/netfilter/ip6_tables.c| 4 ++--
net/ipv6/netfilter/ip6t_SYNPROXY.c | 16
net/ipv6/netfilter/ip6
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/ipvs/ip_vs_ctl.c | 8 ++---
net/netfilter/ipvs/ip_vs_proto.c | 8 ++---
net/netfilter/nf_conntrack_broadcast.c | 2 +
Removed parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script was used to fix this
issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/net
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/ipvs/ip_vs_ctl.c | 8 ++---
net/netfilter/ipvs/ip_vs_proto.c | 8 ++---
net/netfilter/nf_conntrack_broadcast.c | 2 +
Removed parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script was used to fix this
issue:
@@
local idexpression id;
expression e;
@@
id =
-(
e
-)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/net
This patch removes typedefs from struct and renames it from "typedef struct
bitstr_t" to "struct bitstr" as per kernel coding standards."
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_h323_asn1.c | 80 +++
This patch removes multiple assignments to follow the kernel coding
style as also reported by checkpatch.pl.
Done using coccinelle.
@@
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=i1;
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
changes in v2
-Make the
To follow the coding style of kernel the braces are removed/added and
placed properly, if not.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libebt_802_3.c | 3 +--
extensions/libebt_ip.c| 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff
Remove & from function pointers to conform to the style found elsewhere
in the file. Done using the following semantic patch
//
@r@
identifier f;
@@
f(...) { ... }
@@
identifier r.f;
@@
-
+ f
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/bridge
The structs of the type option are not modified anywhere.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/ip6tables.c| 2 +-
iptables/iptables-xml.c | 2 +-
iptables/xtables-arp.c | 2 +-
iptables/xtables-eb.c | 2 +-
iptables/xtables.c | 2 +-
5
The struct arpmangle_opts of the type option is only used to
initialise a field inside the xtables_target struct and is
not modified anywhere.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libarpt_mangle.c | 2 +-
1 file changed, 1 insertion(+), 1 de
Remove instances of explicit NULL comparisons for code compaction.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/netfilter/ip6t_SYNPROXY.c | 16
net/ipv6/netfilter/ip6t_ipv6header.c | 2 +-
net/ipv6/net
Remove & from function pointers to conform to the style found elsewhere
in the file. Done using the following semantic patch
//
@r@
identifier f;
@@
f(...) { ... }
@@
identifier r.f;
@@
-
+ f
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/ip6tab
Remove & from function pointers to conform to the style found elsewhere
in the file. Done using the following semantic patch
//
@r@
identifier f;
@@
f(...) { ... }
@@
identifier r.f;
@@
-
+ f
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfi
Remove & from function pointers to conform to the style found elsewhere
in the file. Done using the following semantic patch
//
@r@
identifier f;
@@
f(...) { ... }
@@
identifier r.f;
@@
-
+ f
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv4
Remove & from function pointers to conform to the style found elsewhere
in the file. Done using the following semantic patch
//
@r@
identifier f;
@@
f(...) { ... }
@@
identifier r.f;
@@
-
+ f
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6
The driver needs to insure atomicity during frequency
changes of bus and device. The iiodev->mlock as used
was not doing that. Replace it with the drivers existing
buffer lock and execute spi_write directly.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
drivers/st
;
@@
e1
-,
+;
e2;
//
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
drivers/iio/adc/max11100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c
index 23c060e1b663..1180bcc22ff1
As per kernel coding style switch and case should be at the same
identation.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/ip6tables-restore.c | 62 ++--
1 file changed, 31 insertions(+), 31 deletions(-)
diff
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libarpt_mangle.c | 2 +-
e
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/nft-arp.c | 4 ++--
iptables/xtab
Fixed coding style for null comparisons to be more
consistant with the rest of the kernel coding style.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv4/netfilter/arp_tables.c| 2 +-
net/ipv4/netfilter/arptable_filter.c | 2 +-
ne
Remove instances of explicit NULL comparisons for code compaction.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv4/netfilter/arp_tables.c| 3 +--
net/ipv4/netfilter/arptable_filter.c | 2 +-
net/ipv4/netfilter/ipt_CLUST
Remove instances of explicit NULL comparisons for code compaction.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/netfilter/ip6t_SYNPROXY.c | 16
net/ipv6/netfilter/ip6t_ipv6header.c | 2 +-
net/ipv6/net
Ident the code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/xtables-arp.c | 4 ++--
iptables/xtables-eb.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index 6aa000a..38b0206
Add blank line after the declaration of variable to follow kernel coding
style.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/getethertype.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/iptables/getethertype.c b/iptables/getethertype.c
index 027ef4a..b
Remove the assignment from if condition to follow kernel coding style
and make the code more clear and readable.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
iptables/getethertype.c | 3 ++-
iptables/nft-arp.c | 3 ++-
2 files changed, 4 insertions(+), 2 del
Solved the multiple checkpatch issues.
Arushi Singhal (4):
iptables: iptables: Add blank line after declaration
iptables: iptables: Remove assignment in if condition
iptables: iptables: Indent the code.
iptables: iptables: switch and case should be at the same indent
iptables
This comments are obsolete and should go, as there are no set of rules per
CPU anymore.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/ipv6/netfilter/ip6_tables.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/net/ipv6/netfilter/ip6_tables.c b/ne
Replace explicit NULL comparison to simplify code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/ipvs/ip_vs_ctl.c | 40
net/netfilter/ipvs/ip_vs_proto.c | 22 +++---
2 files changed, 31 inse
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_broadcast.c | 2 +-
net/netfilter/nf_conntrack_core.c | 2 +-
net/netfilter/nf_conntrack_ecache.c| 4 +--
net/net
s well:
% IPTABLES=/../../xtables-multi iptables ./run-tests.sh
Signed-off-by: Arushi Singhal
---
changes in v2
- Called the same script setting $IPTABLES to iptables or
ip6tables instead of having the same script twice for iptables and
ip6tables.
iptables/tests/shell/run-tests.sh
typos/Grammatical errors are corrected.
Signed-off-by: Arushi Singhal
---
changes in v2
-removed the changes with better original version.
doc/nft.xml | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/nft.xml b/doc/nft.xml
index 3a5571b..dc93a8c 100644
--- a/doc
typos/Grammatical errors are corrected.
Signed-off-by: Arushi Singhal
---
doc/nft.xml | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/nft.xml b/doc/nft.xml
index 3a5571b..8f463c6 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -1433,7 +1433,7 @@ table inet
There is a difference between error messages in iptables and
iptables-compat:
#sudo iptables-compat -D INPUT 4
iptables: No chain/target/match by that name.
#sudo iptables -D INPUT 4
iptables: Index of deletion too big.
Now, will show same error message.
Signed-off-by: Arushi Singhal
Shell prompt ends with:
"%", indicates a C shell.
"$", indicates shell that's compatible with the Bash.
"#", indicates shell is running as the system's root.
So, "%" is replaced with "$" or "#".
Signed-off-by: Arushi Singhal
---
test
Correct some typo mistakes done while converting man page source to
asciidoc.
Signed-off-by: Arushi Singhal
---
doc/data-types.txt | 33 ++---
doc/nft.txt| 11 ---
doc/payload-expression.txt | 9 +++--
doc/primary-expression.txt
changes in package dependencies for PDF creation (nft.pdf) from asciidoc.
Signed-off-by: Arushi Singhal
---
configure.ac | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index c1c9035..06f15c9 100644
--- a/configure.ac
+++ b/configure.ac
Correct all the typo mistakes done while converting man page source to
asciidoc.
Signed-off-by: Arushi Singhal
---
changes in v2
-submit the patch on top of current git HEAD
doc/data-types.txt | 2 +-
doc/nft.txt| 6 +++---
doc/primary-expression.txt | 2 +-
doc
changes in package dependencies for PDF creation (nft.pdf) from
asciidoc.
Signed-off-by: Arushi Singhal
---
changes in v2
-remove duplicacy of code
configure.ac | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index c1c9035..11e1ebb
Correct all the typo mistakes done while converting man page source to
asciidoc.
Signed-off-by: Arushi Singhal
---
doc/data-types.txt | 2 +-
doc/nft.txt| 7 +++
doc/primary-expression.txt | 2 +-
doc/statements.txt | 6 +++---
4 files changed, 8 insertions
fix make distcheck for conversion to asciidoc.
Signed-off-by: Arushi Singhal
---
doc/Makefile.am | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 291bcc8..4d8cd98 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,11
;[EXECUTING]" prompt it is clearing last prompt of the test file.
Signed-off-by: Arushi Singhal
---
iptables/tests/shell/README | 17 +
iptables/tests/shell/run-tests.sh | 2 +-
iptables/tests/shell/testcases/chain/0002newchain_0 | 9 +
Add test for testing if iptables configuration is restored and saved.
Signed-off-by: Arushi Singhal
---
.../shell/testcases/ipt-save/0003save-restore_0| 47 ++
1 file changed, 47 insertions(+)
create mode 100644 iptables/tests/shell/testcases/ipt-save/0003save-restore_0
Using pr_() is more concise than
printk(KERN_).
Replace printks having a log level with the appropriate
pr_*() macros.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
changes in v2
*in v1 printk() were replaced with netdev_*()
net/netfilter/nf_conntrack_acct.c
.
* Remove periods from messages.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_acct.c | 6 --
net/netfilter/nf_conntrack_ecache.c| 6 --
net/netfilter/nf_conntrack_timestamp.c | 6 --
net/netfilter/nf_nat_core.c
Merge assignment with return statement to directly return the value.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
net/netfilter/nf_conntrack_netlink.c | 5 ++---
net/netfilter/xt_hashlimit.c | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff
The struct of type option is only used to initialise a field and
is not modified anywhere.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
changes in v2
*subject is modified.
extensions/libarpt_mangle.c | 2 +-
iptables/iptables-xml.c | 2 +-
2 files chan
The struct of type option is only used to initialise a field and
is not modified anywhere.
Signed-off-by: Arushi Singhal <arushisinghal19971...@gmail.com>
---
extensions/libarpt_mangle.c | 2 +-
iptables/iptables-xml.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff
Test is added for iptables-restore with no option.
Shell test-suite is updated for new tests.
Signed-off-by: Arushi Singhal
---
iptables/tests/shell/run-tests.sh | 8 --
.../save-restore/0001_restore_no_option_0 | 30 ++
2 files changed, 36
README added
Signed-off-by: Arushi Singhal
---
iptables/tests/shell/README | 20
1 file changed, 20 insertions(+)
create mode 100644 iptables/tests/shell/README
diff --git a/iptables/tests/shell/README b/iptables/tests/shell/README
new file mode 100644
index 000
70 matches
Mail list logo