summaryrefslogtreecommitdiffstats
path: root/src/network.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-05-18 21:16:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2008-05-18 21:16:05 +0200
commitdb91cafe5b72f9f591dd8c168427005503186c01 (patch)
treefa4ab2a1e6a4fcf34249fefb1792412c9ccc8f0f /src/network.c
parentbe2450f37f2ce56eadc78793efc4a54ced4315c6 (diff)
improve network message sanity checkings
Diffstat (limited to 'src/network.c')
-rw-r--r--src/network.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/network.c b/src/network.c
index d7ab415..fb6ea90 100644
--- a/src/network.c
+++ b/src/network.c
@@ -171,30 +171,6 @@ void build_netmsg(struct nf_conntrack *ct, int query, struct nethdr *net)
build_netpld(ct, pld, query);
}
-int handle_netmsg(struct nethdr *net)
-{
- struct netpld *pld = NETHDR_DATA(net);
-
- /* message too small: no room for the header */
- if (ntohs(net->len) < NETHDR_ACK_SIZ)
- return -1;
-
- HDR_NETWORK2HOST(net);
-
- if (IS_CTL(net))
- return 0;
-
- /* information received is too small */
- if (net->len < sizeof(struct netpld))
- return -1;
-
- /* size mismatch! */
- if (net->len < ntohs(pld->len) + NETHDR_SIZ)
- return -1;
-
- return 0;
-}
-
static int local_seq_set = 0;
/* this function only tracks, it does not update the last sequence received */