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
Merge assignment with return statement to directly return the value.
Signed-off-by: Arushi Singhal
---
net/netfilter/nf_conntrack_netlink.c | 5 ++---
net/netfilter/xt_hashlimit.c | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/netfilter
Using pr_() is more concise than
printk(KERN_).
Replace printks having a log level with the appropriate
pr_*() macros.
Signed-off-by: Arushi Singhal
---
changes in v2
*in v1 printk() were replaced with netdev_*()
net/netfilter/nf_conntrack_acct.c | 2 +-
net/netfilter
Replace printk having a log level with the appropriate
net_*macro_ratelimited.
It's better to use actual device name as a prefix in error messages.
Signed-off-by: Arushi Singhal
---
changes in v2
*In v1 printk was changed to pr_*macro(), which is used
in kernel instead of calling p
Replace printk having a log level with the appropriate
net_*macro_ratelimited.
It's better to use actual device name as a prefix in error messages.
Indentation is also changed, to fix the checkpatch issue.
Signed-off-by: Arushi Singhal
---
changes in v2
*In previous version printk was ch
Using pr_() is more concise than printk(KERN_).
Replace printks having a log level with the appropriate pr_*() macros.
Signed-off-by: Arushi Singhal
---
drivers/staging/ipx/af_ipx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ipx/af_ipx.c b/drivers
Continue at the bottom of a loop are removed.
Issue found using drop_continue.cocci Coccinelle script.
Signed-off-by: Arushi Singhal
---
Changes in v2:
- Braces is dropped from if with single statement.
drivers/net/ethernet/amd/ni65.c | 4 +---
drivers/net/ethernet/neterion
Continue at the bottom of a loop are removed.
Issue found using drop_continue.cocci Coccinelle script.
Signed-off-by: Arushi Singhal
---
drivers/net/ethernet/amd/ni65.c | 1 -
drivers/net/ethernet/neterion/s2io.c | 1 -
drivers/net/ethernet/netronome/nfp
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal
---
net/netfilter/nf_conntrack_broadcast.c | 2 +-
net/netfilter/nf_conntrack_core.c | 2 +-
net/netfilter/nf_conntrack_ecache.c| 4 +--
net/netfilter/nf_conntrack_helper.c| 4
Replace explicit NULL comparison to simplify code.
Signed-off-by: Arushi Singhal
---
net/netfilter/ipvs/ip_vs_ctl.c | 40
net/netfilter/ipvs/ip_vs_proto.c | 22 +++---
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/net
This comments are obsolete and should go, as there are no set of rules per
CPU anymore.
Signed-off-by: Arushi Singhal
---
net/ipv6/netfilter/ip6_tables.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index
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
---
extensions/libarpt_mangle.c | 2 +-
extensions/libip6t_rt.c | 2 +-
extensi
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
---
iptables/nft-arp.c | 4 ++--
iptables/xtables-arp.c | 12 ++--
2 fi
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
+ f
//
Signed-off-by: Arushi Singhal
---
iptables/ip6tables-save.c | 2 +-
iptables/iptable
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
+ f
//
Signed-off-by: Arushi Singhal
---
net/netfilter/ipset/ip_set_core.c | 2 +-
net/n
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
+ f
//
Signed-off-by: Arushi Singhal
---
net/bridge/netfilter/nft_meta_bridge.c | 2 +-
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
+ f
//
Signed-off-by: Arushi Singhal
---
net/ipv6/netfilter/nft_fib_ipv6.c | 2 +-
1 file
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
+ f
//
Signed-off-by: Arushi Singhal
---
net/ipv4/netfilter/nft_fib_ipv4.c | 2 +-
1 file
Simplify NULL comparisons to follow kernel coding style.
Arushi Singhal (2):
ipv4: netfilter: Simplify NULL comparisons
ipv6: netfilter: Simplify NULL comparisons
net/ipv4/netfilter/arp_tables.c| 3 +--
net/ipv4/netfilter/arptable_filter.c | 2 +-
net/ipv4
Remove instances of explicit NULL comparisons for code compaction.
Signed-off-by: Arushi Singhal
---
net/ipv4/netfilter/arp_tables.c| 3 +--
net/ipv4/netfilter/arptable_filter.c | 2 +-
net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +-
net/ipv4/netfilter
Remove instances of explicit NULL comparisons for code compaction.
Signed-off-by: Arushi Singhal
---
net/ipv6/netfilter/ip6t_SYNPROXY.c | 16
net/ipv6/netfilter/ip6t_ipv6header.c | 2 +-
net/ipv6/netfilter/ip6table_filter.c | 2 +-
net/ipv6
Fixed coding style for null comparisons to be more
consistant with the rest of the kernel coding style.
Signed-off-by: Arushi Singhal
---
net/ipv4/netfilter/arp_tables.c| 2 +-
net/ipv4/netfilter/arptable_filter.c | 2 +-
net/ipv4/netfilter/ipt_CLUSTERIP.c
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
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
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
---
net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++--
1 file
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal
---
net/netfilter/ipvs/ip_vs_ctl.c | 8 ++---
net/netfilter/ipvs/ip_vs_proto.c | 8 ++---
net/netfilter/nf_conntrack_broadcast.c | 2 +-
net/netfilter/nf_conntrack_core.c | 2
fix the line over 80 characters as reported by checkpatch.pl
Signed-off-by: Arushi Singhal
---
net/ipv6/netfilter/ip6_tables.c| 6 --
net/ipv6/netfilter/ip6t_SYNPROXY.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6
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
---
net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++--
1 file
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
---
net/ipv6/netfilter/ip6_tables.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/net/ipv6
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal
---
net/netfilter/ipvs/ip_vs_ctl.c | 8 ++---
net/netfilter/ipvs/ip_vs_proto.c | 8 ++---
net/netfilter/nf_conntrack_broadcast.c | 2 +-
net/netfilter/nf_conntrack_core.c | 2
Fixed coding style for null comparisons to be more
consistant with the rest of the kernel coding style.
Signed-off-by: Arushi Singhal
---
net/bridge/netfilter/ebt_among.c | 12 ++--
net/bridge/netfilter/ebt_arp.c | 10 +-
net/bridge/netfilter/ebt_arpreply.c
Replace explicit NULL comparison with ! operator to simplify code.
Signed-off-by: Arushi Singhal
---
net/ipv6/netfilter/ip6_tables.c| 4 ++--
net/ipv6/netfilter/ip6t_SYNPROXY.c | 16
net/ipv6/netfilter/ip6t_ah.c | 2 +-
net/ipv6
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
---
net/netfilter/nf_conntrack_h323_asn1.c | 80 +-
1 file chan
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
---
changes in v3
-make the subject more clear.
include/linux
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
---
changes in v2
- make the patch title more relevant
- make the
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
---
net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 +-
net/netfilter
To remove complexity of code the function is added in nfnetlink.h
to make code more clear and readable.
Signed-off-by: Arushi Singhal
---
include/linux/netfilter/nfnetlink.h | 6 ++
net/netfilter/nf_conntrack_netlink.c | 12 +++-
2 files changed, 13 insertions(+), 5 deletions
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
---
changes in v2
-Make the commit message more clear and appropriate
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
---
net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 +-
net/netfilter
This patch removes multiple assignments.
Done using coccinelle.
@@
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=c;
Signed-off-by: Arushi Singhal
---
contribution to outreachy netfilter project.
net/netfilter/nf_conntrack_proto_sctp.c | 3 ++-
1 file changed, 2 insertions(+), 1
Remove typedef from struct.
Arushi Singhal (2):
net: netfilter: Remove typedef from "typedef struct field_t"
net: netfilter: Remove typedef from "typedef struct bitstr_t"
net/netfilter/nf_conntrack_h323_asn1.c | 98 +-
1 file changed,
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
---
net/netfilter/nf_conntrack_h323_asn1.c | 80 +-
1 file chan
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
---
net/netfilter/nf_conntrack_h323_asn1.c | 68 +-
1 file chan
43 matches
Mail list logo