Skip to content

Commit ecb6f85

Browse files
Jan Engelhardtdavem330
authored andcommitted
[NETFILTER]: Use const in struct xt_match, xt_target, xt_table
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ca7c48c commit ecb6f85

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎include/linux/netfilter/x_tables.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ struct xt_match
214214
/* Free to use by each match */
215215
unsigned long data;
216216

217-
char *table;
217+
const char *table;
218218
unsigned int matchsize;
219219
unsigned int compatsize;
220220
unsigned int hooks;
@@ -261,7 +261,7 @@ struct xt_target
261261
/* Set this to THIS_MODULE if you are a module, otherwise NULL */
262262
struct module *me;
263263

264-
char *table;
264+
const char *table;
265265
unsigned int targetsize;
266266
unsigned int compatsize;
267267
unsigned int hooks;
@@ -277,7 +277,7 @@ struct xt_table
277277
struct list_head list;
278278

279279
/* A unique name... */
280-
char name[XT_TABLE_MAXNAMELEN];
280+
const char name[XT_TABLE_MAXNAMELEN];
281281

282282
/* What hooks you will enter on */
283283
unsigned int valid_hooks;

‎net/ipv4/netfilter/ip_tables.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static void trace_packet(struct sk_buff *skb,
291291
unsigned int hook,
292292
const struct net_device *in,
293293
const struct net_device *out,
294-
char *tablename,
294+
const char *tablename,
295295
struct xt_table_info *private,
296296
struct ipt_entry *e)
297297
{

‎net/ipv6/netfilter/ip6_tables.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static void trace_packet(struct sk_buff *skb,
320320
unsigned int hook,
321321
const struct net_device *in,
322322
const struct net_device *out,
323-
char *tablename,
323+
const char *tablename,
324324
struct xt_table_info *private,
325325
struct ip6t_entry *e)
326326
{

0 commit comments

Comments
 (0)