/[linux-patches]/genpatches-2.6/tags/2.6.20-9/1007_linux-2.6.20.8.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.20-9/1007_linux-2.6.20.8.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 927 - (show annotations) (download)
Thu Apr 26 15:33:43 2007 UTC (7 years, 4 months ago) by phreak
File size: 1379 byte(s)
2.6.20-9 release
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);

  ViewVC Help
Powered by ViewVC 1.1.20