diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5c8fa7f1e327..d49233f409b5 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1139,10 +1139,9 @@ static int tcp_v4_inbound_md5_hash(struct sock *sk, struct sk_buff *skb) | |||
1139 | 1139 | ||
1140 | if (genhash || memcmp(hash_location, newhash, 16) != 0) { | 1140 | if (genhash || memcmp(hash_location, newhash, 16) != 0) { |
1141 | if (net_ratelimit()) { | 1141 | if (net_ratelimit()) { |
1142 | printk(KERN_INFO "MD5 Hash failed for " | 1142 | printk(KERN_INFO "MD5 Hash failed for (%pI4, %d)->(%pI4, %d)%s\n", |
1143 | "(" NIPQUAD_FMT ", %d)->(" NIPQUAD_FMT ", %d)%s\n", | 1143 | &iph->saddr, ntohs(th->source), |
1144 | NIPQUAD(iph->saddr), ntohs(th->source), | 1144 | &iph->daddr, ntohs(th->dest), |
1145 | NIPQUAD(iph->daddr), ntohs(th->dest), | ||
1146 | genhash ? " tcp_v4_calc_md5_hash failed" : ""); | 1145 | genhash ? " tcp_v4_calc_md5_hash failed" : ""); |
1147 | } | 1146 | } |
1148 | return 1; | 1147 | return 1; |
@@ -1297,10 +1296,8 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1297 | * to destinations, already remembered | 1296 | * to destinations, already remembered |
1298 | * to the moment of synflood. | 1297 | * to the moment of synflood. |
1299 | */ | 1298 | */ |
1300 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: drop open " | 1299 | LIMIT_NETDEBUG(KERN_DEBUG "TCP: drop open request from %pI4/%u\n", |
1301 | "request from " NIPQUAD_FMT "/%u\n", | 1300 | &saddr, ntohs(tcp_hdr(skb)->source)); |
1302 | NIPQUAD(saddr), | ||
1303 | ntohs(tcp_hdr(skb)->source)); | ||
1304 | goto drop_and_release; | 1301 | goto drop_and_release; |
1305 | } | 1302 | } |
1306 | 1303 | ||
@@ -1877,7 +1874,7 @@ static void *listening_get_next(struct seq_file *seq, void *cur) | |||
1877 | struct inet_connection_sock *icsk; | 1874 | struct inet_connection_sock *icsk; |
1878 | struct hlist_node *node; | 1875 | struct hlist_node *node; |
1879 | struct sock *sk = cur; | 1876 | struct sock *sk = cur; |
1880 | struct tcp_iter_state* st = seq->private; | 1877 | struct tcp_iter_state *st = seq->private; |
1881 | struct net *net = seq_file_net(seq); | 1878 | struct net *net = seq_file_net(seq); |
1882 | 1879 | ||
1883 | if (!sk) { | 1880 | if (!sk) { |
@@ -1963,7 +1960,7 @@ static inline int empty_bucket(struct tcp_iter_state *st) | |||
1963 | 1960 | ||
1964 | static void *established_get_first(struct seq_file *seq) | 1961 | static void *established_get_first(struct seq_file *seq) |
1965 | { | 1962 | { |
1966 | struct tcp_iter_state* st = seq->private; | 1963 | struct tcp_iter_state *st = seq->private; |
1967 | struct net *net = seq_file_net(seq); | 1964 | struct net *net = seq_file_net(seq); |
1968 | void *rc = NULL; | 1965 | void *rc = NULL; |
1969 | 1966 | ||
@@ -2008,7 +2005,7 @@ static void *established_get_next(struct seq_file *seq, void *cur) | |||
2008 | struct sock *sk = cur; | 2005 | struct sock *sk = cur; |
2009 | struct inet_timewait_sock *tw; | 2006 | struct inet_timewait_sock *tw; |
2010 | struct hlist_node *node; | 2007 | struct hlist_node *node; |
2011 | struct tcp_iter_state* st = seq->private; | 2008 | struct tcp_iter_state *st = seq->private; |
2012 | struct net *net = seq_file_net(seq); | 2009 | struct net *net = seq_file_net(seq); |
2013 | 2010 | ||
2014 | ++st->num; | 2011 | ++st->num; |
@@ -2067,7 +2064,7 @@ static void *established_get_idx(struct seq_file *seq, loff_t pos) | |||
2067 | static void *tcp_get_idx(struct seq_file *seq, loff_t pos) | 2064 | static void *tcp_get_idx(struct seq_file *seq, loff_t pos) |
2068 | { | 2065 | { |
2069 | void *rc; | 2066 | void *rc; |
2070 | struct tcp_iter_state* st = seq->private; | 2067 | struct tcp_iter_state *st = seq->private; |
2071 | 2068 | ||
2072 | inet_listen_lock(&tcp_hashinfo); | 2069 | inet_listen_lock(&tcp_hashinfo); |
2073 | st->state = TCP_SEQ_STATE_LISTENING; | 2070 | st->state = TCP_SEQ_STATE_LISTENING; |
@@ -2084,7 +2081,7 @@ static void *tcp_get_idx(struct seq_file *seq, loff_t pos) | |||
2084 | 2081 | ||
2085 | static void *tcp_seq_start(struct seq_file *seq, loff_t *pos) | 2082 | static void *tcp_seq_start(struct seq_file *seq, loff_t *pos) |
2086 | { | 2083 | { |
2087 | struct tcp_iter_state* st = seq->private; | 2084 | struct tcp_iter_state *st = seq->private; |
2088 | st->state = TCP_SEQ_STATE_LISTENING; | 2085 | st->state = TCP_SEQ_STATE_LISTENING; |
2089 | st->num = 0; | 2086 | st->num = 0; |
2090 | return *pos ? tcp_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; | 2087 | return *pos ? tcp_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; |
@@ -2093,7 +2090,7 @@ static void *tcp_seq_start(struct seq_file *seq, loff_t *pos) | |||
2093 | static void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 2090 | static void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
2094 | { | 2091 | { |
2095 | void *rc = NULL; | 2092 | void *rc = NULL; |
2096 | struct tcp_iter_state* st; | 2093 | struct tcp_iter_state *st; |
2097 | 2094 | ||
2098 | if (v == SEQ_START_TOKEN) { | 2095 | if (v == SEQ_START_TOKEN) { |
2099 | rc = tcp_get_idx(seq, 0); | 2096 | rc = tcp_get_idx(seq, 0); |
@@ -2123,7 +2120,7 @@ out: | |||
2123 | 2120 | ||
2124 | static void tcp_seq_stop(struct seq_file *seq, void *v) | 2121 | static void tcp_seq_stop(struct seq_file *seq, void *v) |
2125 | { | 2122 | { |
2126 | struct tcp_iter_state* st = seq->private; | 2123 | struct tcp_iter_state *st = seq->private; |
2127 | 2124 | ||
2128 | switch (st->state) { | 2125 | switch (st->state) { |
2129 | case TCP_SEQ_STATE_OPENREQ: | 2126 | case TCP_SEQ_STATE_OPENREQ: |
@@ -2284,7 +2281,7 @@ static void get_timewait4_sock(struct inet_timewait_sock *tw, | |||
2284 | 2281 | ||
2285 | static int tcp4_seq_show(struct seq_file *seq, void *v) | 2282 | static int tcp4_seq_show(struct seq_file *seq, void *v) |
2286 | { | 2283 | { |
2287 | struct tcp_iter_state* st; | 2284 | struct tcp_iter_state *st; |
2288 | int len; | 2285 | int len; |
2289 | 2286 | ||
2290 | if (v == SEQ_START_TOKEN) { | 2287 | if (v == SEQ_START_TOKEN) { |