diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-12-05 14:15:30 -0500 | 
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-12-05 14:15:30 -0500 | 
| commit | c89a86bb96307019867d11874ef0b86adaa0598e (patch) | |
| tree | c44c1a825e8a143a4c52bcb8692292aeb77fa64e /net/ipv4/fib_frontend.c | |
| parent | 07475ffba5800c53573180dd521273642adcd0e9 (diff) | |
| parent | e4f5c82a92c2a546a16af1614114eec19120e40a (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
| -rw-r--r-- | net/ipv4/fib_frontend.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 882f88f6d13b..19b1b984d687 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) | |||
| 544 | struct sk_buff *skb = NULL; | 544 | struct sk_buff *skb = NULL; | 
| 545 | struct nlmsghdr *nlh = NULL; | 545 | struct nlmsghdr *nlh = NULL; | 
| 546 | struct fib_result_nl *frn; | 546 | struct fib_result_nl *frn; | 
| 547 | int err; | ||
| 548 | u32 pid; | 547 | u32 pid; | 
| 549 | struct fib_table *tb; | 548 | struct fib_table *tb; | 
| 550 | 549 | ||
| 551 | skb = skb_recv_datagram(sk, 0, 0, &err); | 550 | skb = skb_dequeue(&sk->sk_receive_queue); | 
| 552 | nlh = (struct nlmsghdr *)skb->data; | 551 | nlh = (struct nlmsghdr *)skb->data; | 
| 552 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || | ||
| 553 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { | ||
| 554 | kfree_skb(skb); | ||
| 555 | return; | ||
| 556 | } | ||
| 553 | 557 | ||
| 554 | frn = (struct fib_result_nl *) NLMSG_DATA(nlh); | 558 | frn = (struct fib_result_nl *) NLMSG_DATA(nlh); | 
| 555 | tb = fib_get_table(frn->tb_id_in); | 559 | tb = fib_get_table(frn->tb_id_in); | 
