obj-$(CONFIG_IP_ROUTE_MULTIPATH_DRR) += multipath_drr.o
obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_IP_VS) += ipvs/
-obj-$(CONFIG_IP_INET_DIAG) += tcp_diag.o
+obj-$(CONFIG_IP_INET_DIAG) += inet_diag.o
obj-$(CONFIG_IP_ROUTE_MULTIPATH_CACHED) += multipath.o
obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
obj-$(CONFIG_TCP_CONG_WESTWOOD) += tcp_westwood.o
#include <linux/inet.h>
#include <linux/stddef.h>
-#include <linux/tcp_diag.h>
+#include <linux/inet_diag.h>
static const struct inet_diag_handler **inet_diag_table;
}
#endif
-#define EXPIRES_IN_MS(tmo) ((tmo-jiffies)*1000+HZ-1)/HZ
+#define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ
if (icsk->icsk_pending == ICSK_TIME_RETRANS) {
r->idiag_timer = 1;
yes = !(entry->userlocks & SOCK_BINDPORT_LOCK);
break;
case INET_DIAG_BC_S_COND:
- case INET_DIAG_BC_D_COND:
- {
- struct inet_diag_hostcond *cond = (struct inet_diag_hostcond*)(op+1);
+ case INET_DIAG_BC_D_COND: {
+ struct inet_diag_hostcond *cond;
u32 *addr;
+ cond = (struct inet_diag_hostcond *)(op + 1);
if (cond->port != -1 &&
cond->port != (op->code == INET_DIAG_BC_S_COND ?
entry->sport : entry->dport)) {
cond->family == AF_INET) {
if (addr[0] == 0 && addr[1] == 0 &&
addr[2] == htonl(0xffff) &&
- bitstring_match(addr+3, cond->addr, cond->prefix_len))
+ bitstring_match(addr + 3, cond->addr,
+ cond->prefix_len))
break;
}
yes = 0;
int len = bytecode_len;
while (len > 0) {
- struct inet_diag_bc_op *op = (struct inet_diag_bc_op*)bc;
+ struct inet_diag_bc_op *op = (struct inet_diag_bc_op *)bc;
//printk("BC: %d %d %d {%d} / %d\n", op->code, op->yes, op->no, op[1].no, len);
switch (op->code) {
case INET_DIAG_BC_S_LE:
case INET_DIAG_BC_D_GE:
case INET_DIAG_BC_D_LE:
- if (op->yes < 4 || op->yes > len+4)
+ if (op->yes < 4 || op->yes > len + 4)
return -EINVAL;
case INET_DIAG_BC_JMP:
- if (op->no < 4 || op->no > len+4)
+ if (op->no < 4 || op->no > len + 4)
return -EINVAL;
if (op->no < len &&
- !valid_cc(bytecode, bytecode_len, len-op->no))
+ !valid_cc(bytecode, bytecode_len, len - op->no))
return -EINVAL;
break;
case INET_DIAG_BC_NOP:
- if (op->yes < 4 || op->yes > len+4)
+ if (op->yes < 4 || op->yes > len + 4)
return -EINVAL;
break;
default: