Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Jan Engelhardt and committed by
David S. Miller
ecb6f85e ca7c48ca

+5 -5
+3 -3
include/linux/netfilter/x_tables.h
··· 214 214 /* Free to use by each match */ 215 215 unsigned long data; 216 216 217 - char *table; 217 + const char *table; 218 218 unsigned int matchsize; 219 219 unsigned int compatsize; 220 220 unsigned int hooks; ··· 261 261 /* Set this to THIS_MODULE if you are a module, otherwise NULL */ 262 262 struct module *me; 263 263 264 - char *table; 264 + const char *table; 265 265 unsigned int targetsize; 266 266 unsigned int compatsize; 267 267 unsigned int hooks; ··· 277 277 struct list_head list; 278 278 279 279 /* A unique name... */ 280 - char name[XT_TABLE_MAXNAMELEN]; 280 + const char name[XT_TABLE_MAXNAMELEN]; 281 281 282 282 /* What hooks you will enter on */ 283 283 unsigned int valid_hooks;
+1 -1
net/ipv4/netfilter/ip_tables.c
··· 291 291 unsigned int hook, 292 292 const struct net_device *in, 293 293 const struct net_device *out, 294 - char *tablename, 294 + const char *tablename, 295 295 struct xt_table_info *private, 296 296 struct ipt_entry *e) 297 297 {
+1 -1
net/ipv6/netfilter/ip6_tables.c
··· 320 320 unsigned int hook, 321 321 const struct net_device *in, 322 322 const struct net_device *out, 323 - char *tablename, 323 + const char *tablename, 324 324 struct xt_table_info *private, 325 325 struct ip6t_entry *e) 326 326 {