aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dccp/diag.c2
-rw-r--r--net/ipv4/Makefile2
-rw-r--r--net/ipv4/inet_diag.c (renamed from net/ipv4/tcp_diag.c)23
-rw-r--r--net/ipv4/tcp_vegas.c2
-rw-r--r--net/ipv4/tcp_westwood.c2
5 files changed, 16 insertions, 15 deletions
diff --git a/net/dccp/diag.c b/net/dccp/diag.c
index 9f07eff2e3b6..0b10c176c35a 100644
--- a/net/dccp/diag.c
+++ b/net/dccp/diag.c
@@ -12,7 +12,7 @@
12#include <linux/config.h> 12#include <linux/config.h>
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/tcp_diag.h> 15#include <linux/inet_diag.h>
16 16
17#include "dccp.h" 17#include "dccp.h"
18 18
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index 9b1c894039a9..fe5accbb56bf 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -30,7 +30,7 @@ obj-$(CONFIG_IP_ROUTE_MULTIPATH_WRANDOM) += multipath_wrandom.o
30obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o 30obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o
31obj-$(CONFIG_NETFILTER) += netfilter/ 31obj-$(CONFIG_NETFILTER) += netfilter/
32obj-$(CONFIG_IP_VS) += ipvs/ 32obj-$(CONFIG_IP_VS) += ipvs/
33obj-$(CONFIG_IP_INET_DIAG) += tcp_diag.o 33obj-$(CONFIG_IP_INET_DIAG) += inet_diag.o
34obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o 34obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o
35obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o 35obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
36obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o 36obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/inet_diag.c
index 24abe82e23a0..3bd510941da0 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -32,7 +32,7 @@
32#include <linux/inet.h> 32#include <linux/inet.h>
33#include <linux/stddef.h> 33#include <linux/stddef.h>
34 34
35#include <linux/tcp_diag.h> 35#include <linux/inet_diag.h>
36 36
37static const struct inet_diag_handler **inet_diag_table; 37static const struct inet_diag_handler **inet_diag_table;
38 38
@@ -140,7 +140,7 @@ static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
140 } 140 }
141#endif 141#endif
142 142
143#define EXPIRES_IN_MS(tmo) ((tmo-jiffies)*1000+HZ-1)/HZ 143#define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ
144 144
145 if (icsk->icsk_pending == ICSK_TIME_RETRANS) { 145 if (icsk->icsk_pending == ICSK_TIME_RETRANS) {
146 r->idiag_timer = 1; 146 r->idiag_timer = 1;
@@ -311,11 +311,11 @@ static int inet_diag_bc_run(const void *bc, int len,
311 yes = !(entry->userlocks & SOCK_BINDPORT_LOCK); 311 yes = !(entry->userlocks & SOCK_BINDPORT_LOCK);
312 break; 312 break;
313 case INET_DIAG_BC_S_COND: 313 case INET_DIAG_BC_S_COND:
314 case INET_DIAG_BC_D_COND: 314 case INET_DIAG_BC_D_COND: {
315 { 315 struct inet_diag_hostcond *cond;
316 struct inet_diag_hostcond *cond = (struct inet_diag_hostcond*)(op+1);
317 u32 *addr; 316 u32 *addr;
318 317
318 cond = (struct inet_diag_hostcond *)(op + 1);
319 if (cond->port != -1 && 319 if (cond->port != -1 &&
320 cond->port != (op->code == INET_DIAG_BC_S_COND ? 320 cond->port != (op->code == INET_DIAG_BC_S_COND ?
321 entry->sport : entry->dport)) { 321 entry->sport : entry->dport)) {
@@ -337,7 +337,8 @@ static int inet_diag_bc_run(const void *bc, int len,
337 cond->family == AF_INET) { 337 cond->family == AF_INET) {
338 if (addr[0] == 0 && addr[1] == 0 && 338 if (addr[0] == 0 && addr[1] == 0 &&
339 addr[2] == htonl(0xffff) && 339 addr[2] == htonl(0xffff) &&
340 bitstring_match(addr+3, cond->addr, cond->prefix_len)) 340 bitstring_match(addr + 3, cond->addr,
341 cond->prefix_len))
341 break; 342 break;
342 } 343 }
343 yes = 0; 344 yes = 0;
@@ -379,7 +380,7 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
379 int len = bytecode_len; 380 int len = bytecode_len;
380 381
381 while (len > 0) { 382 while (len > 0) {
382 struct inet_diag_bc_op *op = (struct inet_diag_bc_op*)bc; 383 struct inet_diag_bc_op *op = (struct inet_diag_bc_op *)bc;
383 384
384//printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len); 385//printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len);
385 switch (op->code) { 386 switch (op->code) {
@@ -390,17 +391,17 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
390 case INET_DIAG_BC_S_LE: 391 case INET_DIAG_BC_S_LE:
391 case INET_DIAG_BC_D_GE: 392 case INET_DIAG_BC_D_GE:
392 case INET_DIAG_BC_D_LE: 393 case INET_DIAG_BC_D_LE:
393 if (op->yes < 4 || op->yes > len+4) 394 if (op->yes < 4 || op->yes > len + 4)
394 return -EINVAL; 395 return -EINVAL;
395 case INET_DIAG_BC_JMP: 396 case INET_DIAG_BC_JMP:
396 if (op->no < 4 || op->no > len+4) 397 if (op->no < 4 || op->no > len + 4)
397 return -EINVAL; 398 return -EINVAL;
398 if (op->no < len && 399 if (op->no < len &&
399 !valid_cc(bytecode, bytecode_len, len-op->no)) 400 !valid_cc(bytecode, bytecode_len, len - op->no))
400 return -EINVAL; 401 return -EINVAL;
401 break; 402 break;
402 case INET_DIAG_BC_NOP: 403 case INET_DIAG_BC_NOP:
403 if (op->yes < 4 || op->yes > len+4) 404 if (op->yes < 4 || op->yes > len + 4)
404 return -EINVAL; 405 return -EINVAL;
405 break; 406 break;
406 default: 407 default:
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 8cef9dc11fb7..93c5f92070f9 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -35,7 +35,7 @@
35#include <linux/mm.h> 35#include <linux/mm.h>
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/skbuff.h> 37#include <linux/skbuff.h>
38#include <linux/tcp_diag.h> 38#include <linux/inet_diag.h>
39 39
40#include <net/tcp.h> 40#include <net/tcp.h>
41 41
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 395100317875..0c340c3756c2 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -8,7 +8,7 @@
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/skbuff.h> 10#include <linux/skbuff.h>
11#include <linux/tcp_diag.h> 11#include <linux/inet_diag.h>
12#include <net/tcp.h> 12#include <net/tcp.h>
13 13
14/* TCP Westwood structure */ 14/* TCP Westwood structure */