Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14798
b: refs/heads/master
c: 9b5b5cf
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Nov 30, 2005
1 parent 72a08f7 commit fcfa2de
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb29644994744a63bc57186cefa79534b5d9b5a9
refs/heads/master: 9b5b5cff9a6655dbb6d2e2be365bb95eec3950eb
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ static void fib_seq_stop(struct seq_file *seq, void *v)

static unsigned fib_flag_trans(int type, u32 mask, struct fib_info *fi)
{
static unsigned type2flags[RTN_MAX + 1] = {
static const unsigned type2flags[RTN_MAX + 1] = {
[7] = RTF_REJECT, [8] = RTF_REJECT,
};
unsigned flags = type2flags[type];
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ for (nhsel=0; nhsel < 1; nhsel++)
#define endfor_nexthops(fi) }


static struct
static const struct
{
int error;
u8 scope;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ struct icmp_control {
short error; /* This ICMP is classed as an error message */
};

static struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];

/*
* The ICMP socket(s). This is the most convenient way to flow control
Expand Down Expand Up @@ -994,7 +994,7 @@ int icmp_rcv(struct sk_buff *skb)
/*
* This table is the definition of how we handle ICMP.
*/
static struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
static const struct icmp_control icmp_pointers[NR_ICMP_TYPES + 1] = {
[ICMP_ECHOREPLY] = {
.output_entry = ICMP_MIB_OUTECHOREPS,
.input_entry = ICMP_MIB_INECHOREPS,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ static inline int todrop_entry(struct ip_vs_conn *cp)
* The drop rate array needs tuning for real environments.
* Called from timer bh only => no locking
*/
static char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
static const char todrop_rate[9] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
static char todrop_counter[9] = {0};
int i;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ static int ip_vs_set_timeout(struct ip_vs_timeout_user *u)
#define DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user))
#define MAX_ARG_LEN SVCDEST_ARG_LEN

static unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = {
static const unsigned char set_arglen[SET_CMDID(IP_VS_SO_SET_MAX)+1] = {
[SET_CMDID(IP_VS_SO_SET_ADD)] = SERVICE_ARG_LEN,
[SET_CMDID(IP_VS_SO_SET_EDIT)] = SERVICE_ARG_LEN,
[SET_CMDID(IP_VS_SO_SET_DEL)] = SERVICE_ARG_LEN,
Expand Down Expand Up @@ -2180,7 +2180,7 @@ __ip_vs_get_timeouts(struct ip_vs_timeout_user *u)
#define GET_TIMEOUT_ARG_LEN (sizeof(struct ip_vs_timeout_user))
#define GET_DAEMON_ARG_LEN (sizeof(struct ip_vs_daemon_user) * 2)

static unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = {
static const unsigned char get_arglen[GET_CMDID(IP_VS_SO_GET_MAX)+1] = {
[GET_CMDID(IP_VS_SO_GET_VERSION)] = 64,
[GET_CMDID(IP_VS_SO_GET_INFO)] = GET_INFO_ARG_LEN,
[GET_CMDID(IP_VS_SO_GET_SERVICES)] = GET_SERVICES_ARG_LEN,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/ipvs/ip_vs_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
#define TCP_DIR_OUTPUT 4
#define TCP_DIR_INPUT_ONLY 8

static int tcp_state_off[IP_VS_DIR_LAST] = {
static const int tcp_state_off[IP_VS_DIR_LAST] = {
[IP_VS_DIR_INPUT] = TCP_DIR_INPUT,
[IP_VS_DIR_OUTPUT] = TCP_DIR_OUTPUT,
[IP_VS_DIR_INPUT_ONLY] = TCP_DIR_INPUT_ONLY,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ip_conntrack_amanda.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
module_param(master_timeout, int, 0600);
MODULE_PARM_DESC(master_timeout, "timeout for the master connection");

static char *conns[] = { "DATA ", "MESG ", "INDEX " };
static const char *conns[] = { "DATA ", "MESG ", "INDEX " };

/* This is slow, but it's simple. --RR */
static char *amanda_buffer;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ip_conntrack_ftp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int try_rfc959(const char *, size_t, u_int32_t [], char);
static int try_eprt(const char *, size_t, u_int32_t [], char);
static int try_epsv_response(const char *, size_t, u_int32_t [], char);

static struct ftp_search {
static const struct ftp_search {
enum ip_conntrack_dir dir;
const char *pattern;
size_t plen;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ip_conntrack_irc.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MODULE_PARM_DESC(max_dcc_channels, "max number of expected DCC channels per IRC
module_param(dcc_timeout, int, 0400);
MODULE_PARM_DESC(dcc_timeout, "timeout on for unestablished DCC channels");

static char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
static const char *dccprotos[] = { "SEND ", "CHAT ", "MOVE ", "TSEND ", "SCHAT " };
#define MINMATCHLEN 5

#if 0
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int icmp_invert_tuple(struct ip_conntrack_tuple *tuple,
const struct ip_conntrack_tuple *orig)
{
/* Add 1; spaces filled with 0. */
static u_int8_t invmap[]
static const u_int8_t invmap[]
= { [ICMP_ECHO] = ICMP_ECHOREPLY + 1,
[ICMP_ECHOREPLY] = ICMP_ECHO + 1,
[ICMP_TIMESTAMP] = ICMP_TIMESTAMPREPLY + 1,
Expand Down Expand Up @@ -110,7 +110,7 @@ static int icmp_packet(struct ip_conntrack *ct,
return NF_ACCEPT;
}

static u_int8_t valid_new[] = {
static const u_int8_t valid_new[] = {
[ICMP_ECHO] = 1,
[ICMP_TIMESTAMP] = 1,
[ICMP_INFO_REQUEST] = 1,
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static unsigned long ip_ct_sctp_timeout_shutdown_sent = 300 SECS / 1000;
static unsigned long ip_ct_sctp_timeout_shutdown_recd = 300 SECS / 1000;
static unsigned long ip_ct_sctp_timeout_shutdown_ack_sent = 3 SECS;

static unsigned long * sctp_timeouts[]
static const unsigned long * sctp_timeouts[]
= { NULL, /* SCTP_CONNTRACK_NONE */
&ip_ct_sctp_timeout_closed, /* SCTP_CONNTRACK_CLOSED */
&ip_ct_sctp_timeout_cookie_wait, /* SCTP_CONNTRACK_COOKIE_WAIT */
Expand Down Expand Up @@ -118,7 +118,7 @@ cookie echoed to closed.
*/

/* SCTP conntrack state transitions */
static enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
static const enum sctp_conntrack sctp_conntracks[2][9][SCTP_CONNTRACK_MAX] = {
{
/* ORIGINAL */
/* sNO, sCL, sCW, sCE, sES, sSS, sSR, sSA */
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ unsigned long ip_ct_tcp_timeout_close = 10 SECS;
to ~13-30min depending on RTO. */
unsigned long ip_ct_tcp_timeout_max_retrans = 5 MINS;

static unsigned long * tcp_timeouts[]
static const unsigned long * tcp_timeouts[]
= { NULL, /* TCP_CONNTRACK_NONE */
&ip_ct_tcp_timeout_syn_sent, /* TCP_CONNTRACK_SYN_SENT, */
&ip_ct_tcp_timeout_syn_recv, /* TCP_CONNTRACK_SYN_RECV, */
Expand Down Expand Up @@ -170,7 +170,7 @@ enum tcp_bit_set {
* if they are invalid
* or we do not support the request (simultaneous open)
*/
static enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
static const enum tcp_conntrack tcp_conntracks[2][6][TCP_CONNTRACK_MAX] = {
{
/* ORIGINAL */
/* sNO, sSS, sSR, sES, sFW, sCW, sLA, sTW, sCL, sLI */
Expand Down Expand Up @@ -817,7 +817,7 @@ void ip_conntrack_tcp_update(struct sk_buff *skb,
#define TH_CWR 0x80

/* table of valid flag combinations - ECE and CWR are always valid */
static u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG) + 1] =
{
[TH_SYN] = 1,
[TH_SYN|TH_ACK] = 1,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ static int ipt_get_matches(char *buffer, char **start, off_t offset, int length)
return pos;
}

static struct { char *name; get_info_t *get_info; } ipt_proc_entry[] =
static const struct { char *name; get_info_t *get_info; } ipt_proc_entry[] =
{ { "ip_tables_names", ipt_get_tables },
{ "ip_tables_targets", ipt_get_targets },
{ "ip_tables_matches", ipt_get_matches },
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ipt_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void dump_packet(const struct nf_loginfo *info,
}
case IPPROTO_ICMP: {
struct icmphdr _icmph, *ich;
static size_t required_len[NR_ICMP_TYPES+1]
static const size_t required_len[NR_ICMP_TYPES+1]
= { [ICMP_ECHOREPLY] = 4,
[ICMP_DEST_UNREACH]
= 8 + sizeof(struct iphdr),
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/ipv4/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fold_field(void *mib[], int offt)
}

/* snmp items */
static struct snmp_mib snmp4_ipstats_list[] = {
static const struct snmp_mib snmp4_ipstats_list[] = {
SNMP_MIB_ITEM("InReceives", IPSTATS_MIB_INRECEIVES),
SNMP_MIB_ITEM("InHdrErrors", IPSTATS_MIB_INHDRERRORS),
SNMP_MIB_ITEM("InAddrErrors", IPSTATS_MIB_INADDRERRORS),
Expand All @@ -119,7 +119,7 @@ static struct snmp_mib snmp4_ipstats_list[] = {
SNMP_MIB_SENTINEL
};

static struct snmp_mib snmp4_icmp_list[] = {
static const struct snmp_mib snmp4_icmp_list[] = {
SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS),
SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS),
SNMP_MIB_ITEM("InDestUnreachs", ICMP_MIB_INDESTUNREACHS),
Expand Down Expand Up @@ -149,7 +149,7 @@ static struct snmp_mib snmp4_icmp_list[] = {
SNMP_MIB_SENTINEL
};

static struct snmp_mib snmp4_tcp_list[] = {
static const struct snmp_mib snmp4_tcp_list[] = {
SNMP_MIB_ITEM("RtoAlgorithm", TCP_MIB_RTOALGORITHM),
SNMP_MIB_ITEM("RtoMin", TCP_MIB_RTOMIN),
SNMP_MIB_ITEM("RtoMax", TCP_MIB_RTOMAX),
Expand All @@ -167,15 +167,15 @@ static struct snmp_mib snmp4_tcp_list[] = {
SNMP_MIB_SENTINEL
};

static struct snmp_mib snmp4_udp_list[] = {
static const struct snmp_mib snmp4_udp_list[] = {
SNMP_MIB_ITEM("InDatagrams", UDP_MIB_INDATAGRAMS),
SNMP_MIB_ITEM("NoPorts", UDP_MIB_NOPORTS),
SNMP_MIB_ITEM("InErrors", UDP_MIB_INERRORS),
SNMP_MIB_ITEM("OutDatagrams", UDP_MIB_OUTDATAGRAMS),
SNMP_MIB_SENTINEL
};

static struct snmp_mib snmp4_net_list[] = {
static const struct snmp_mib snmp4_net_list[] = {
SNMP_MIB_ITEM("SyncookiesSent", LINUX_MIB_SYNCOOKIESSENT),
SNMP_MIB_ITEM("SyncookiesRecv", LINUX_MIB_SYNCOOKIESRECV),
SNMP_MIB_ITEM("SyncookiesFailed", LINUX_MIB_SYNCOOKIESFAILED),
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ out: kfree_skb(skb);
* are needed for AMPRnet AX.25 paths.
*/

static unsigned short mtu_plateau[] =
static const unsigned short mtu_plateau[] =
{32000, 17914, 8166, 4352, 2002, 1492, 576, 296, 216, 128 };

static __inline__ unsigned short guess_mtu(unsigned short old_mtu)
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
* closed.
*/

static unsigned char new_state[16] = {
static const unsigned char new_state[16] = {
/* current state: new state: action: */
/* (Invalid) */ TCP_CLOSE,
/* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN,
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void icmpv6_cleanup(void)
inet6_del_protocol(&icmpv6_protocol, IPPROTO_ICMPV6);
}

static struct icmp6_err {
static const struct icmp6_err {
int err;
int fatal;
} tab_unreach[] = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ static int ip6t_get_matches(char *buffer, char **start, off_t offset, int length
return pos;
}

static struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] =
static const struct { char *name; get_info_t *get_info; } ip6t_proc_entry[] =
{ { "ip6_tables_names", ip6t_get_tables },
{ "ip6_tables_targets", ip6t_get_targets },
{ "ip6_tables_matches", ip6t_get_matches },
Expand Down

0 comments on commit fcfa2de

Please sign in to comment.