summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-12-05 15:48:41 +0000
committerAnton Altaparmakov <aia21@cantab.net>2005-12-05 15:48:41 +0000
commit292d4ed32e35df4755052b5002e533348d1648fd (patch)
tree8522e6bab962696bd25a6c02fb068c674a09b7ee /net/ipv4/fib_frontend.c
parent3c6af7fa787f21f8873a050568ed892312899eb5 (diff)
parente4f5c82a92c2a546a16af1614114eec19120e40a (diff)
downloadkernel-crypto-292d4ed32e35df4755052b5002e533348d1648fd.tar.gz
kernel-crypto-292d4ed32e35df4755052b5002e533348d1648fd.tar.xz
kernel-crypto-292d4ed32e35df4755052b5002e533348d1648fd.zip
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 882f88f6d13..19b1b984d68 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -544,12 +544,16 @@ static void nl_fib_input(struct sock *sk, int len)
struct sk_buff *skb = NULL;
struct nlmsghdr *nlh = NULL;
struct fib_result_nl *frn;
- int err;
u32 pid;
struct fib_table *tb;
- skb = skb_recv_datagram(sk, 0, 0, &err);
+ skb = skb_dequeue(&sk->sk_receive_queue);
nlh = (struct nlmsghdr *)skb->data;
+ if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||
+ nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) {
+ kfree_skb(skb);
+ return;
+ }
frn = (struct fib_result_nl *) NLMSG_DATA(nlh);
tb = fib_get_table(frn->tb_id_in);