Contents of /trunk/kernel26-alx/patches-2.6.20-r5/0108-2.6.20.8-all-fixes.patch
Parent Directory | Revision Log
Revision 199 -
(show annotations)
(download)
Fri May 18 11:04:36 2007 UTC (17 years, 4 months ago) by niro
File size: 1379 byte(s)
Fri May 18 11:04:36 2007 UTC (17 years, 4 months ago) by niro
File size: 1379 byte(s)
-import
1 | diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c |
2 | index d47b72a..fa2cb8c 100644 |
3 | --- a/net/ipv4/fib_frontend.c |
4 | +++ b/net/ipv4/fib_frontend.c |
5 | @@ -772,6 +772,8 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) |
6 | .nl_u = { .ip4_u = { .daddr = frn->fl_addr, |
7 | .tos = frn->fl_tos, |
8 | .scope = frn->fl_scope } } }; |
9 | + |
10 | + frn->err = -ENOENT; |
11 | if (tb) { |
12 | local_bh_disable(); |
13 | |
14 | @@ -783,6 +785,7 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb ) |
15 | frn->nh_sel = res.nh_sel; |
16 | frn->type = res.type; |
17 | frn->scope = res.scope; |
18 | + fib_res_put(&res); |
19 | } |
20 | local_bh_enable(); |
21 | } |
22 | @@ -797,6 +800,9 @@ static void nl_fib_input(struct sock *sk, int len) |
23 | struct fib_table *tb; |
24 | |
25 | skb = skb_dequeue(&sk->sk_receive_queue); |
26 | + if (skb == NULL) |
27 | + return; |
28 | + |
29 | nlh = (struct nlmsghdr *)skb->data; |
30 | if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || |
31 | nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { |
32 | @@ -809,7 +815,7 @@ static void nl_fib_input(struct sock *sk, int len) |
33 | |
34 | nl_fib_lookup(frn, tb); |
35 | |
36 | - pid = nlh->nlmsg_pid; /*pid of sending process */ |
37 | + pid = NETLINK_CB(skb).pid; /* pid of sending process */ |
38 | NETLINK_CB(skb).pid = 0; /* from kernel */ |
39 | NETLINK_CB(skb).dst_group = 0; /* unicast */ |
40 | netlink_unicast(sk, skb, pid, MSG_DONTWAIT); |