]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/route.c
Merge with ../linux-2.6-smp
[linux-2.6-omap-h63xx.git] / net / ipv4 / route.c
index 9f91a116d91926df3ba936a80f020a6ab1084d2b..f4d53c9198694ee9731681cee0da35fb89eca801 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Version:    $Id: route.c,v 1.103 2002/01/12 07:44:09 davem Exp $
  *
- * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
+ * Authors:    Ross Biro
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *             Alan Cox, <gw4pts@gw4pts.ampr.org>
  *             Linus Torvalds, <Linus.Torvalds@helsinki.fi>
@@ -397,7 +397,7 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v)
        struct rt_cache_stat *st = v;
 
        if (v == SEQ_START_TOKEN) {
-               seq_printf(seq, "entries  in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src  out_hit out_slow_tot out_slow_mc  gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
+               seq_printf(seq, "entries  in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src  out_hit out_slow_tot out_slow_mc  gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
                return 0;
        }
        
@@ -1048,7 +1048,8 @@ void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more)
                        return;
                }
        } else
-               printk(KERN_DEBUG "rt_bind_peer(0) @%p\n", NET_CALLER(iph));
+               printk(KERN_DEBUG "rt_bind_peer(0) @%p\n", 
+                      __builtin_return_address(0));
 
        ip_select_fb_ident(iph);
 }
@@ -2580,7 +2581,7 @@ int ip_route_output_key(struct rtable **rp, struct flowi *flp)
 }
 
 static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
-                       int nowait)
+                       int nowait, unsigned int flags)
 {
        struct rtable *rt = (struct rtable*)skb->dst;
        struct rtmsg *r;
@@ -2590,9 +2591,8 @@ static int rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq, int event,
 #ifdef CONFIG_IP_MROUTE
        struct rtattr *eptr;
 #endif
-       nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*r));
+       nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags);
        r = NLMSG_DATA(nlh);
-       nlh->nlmsg_flags = (nowait && pid) ? NLM_F_MULTI : 0;
        r->rtm_family    = AF_INET;
        r->rtm_dst_len  = 32;
        r->rtm_src_len  = 0;
@@ -2743,7 +2743,7 @@ int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void *arg)
        NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid;
 
        err = rt_fill_info(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq,
-                               RTM_NEWROUTE, 0);
+                               RTM_NEWROUTE, 0, 0);
        if (!err)
                goto out_free;
        if (err < 0) {
@@ -2780,8 +2780,8 @@ int ip_rt_dump(struct sk_buff *skb,  struct netlink_callback *cb)
                                continue;
                        skb->dst = dst_clone(&rt->u.dst);
                        if (rt_fill_info(skb, NETLINK_CB(cb->skb).pid,
-                                        cb->nlh->nlmsg_seq,
-                                        RTM_NEWROUTE, 1) <= 0) {
+                                        cb->nlh->nlmsg_seq, RTM_NEWROUTE, 
+                                        1, NLM_F_MULTI) <= 0) {
                                dst_release(xchg(&skb->dst, NULL));
                                rcu_read_unlock_bh();
                                goto done;
@@ -2842,7 +2842,7 @@ ctl_table ipv4_route_table[] = {
                .procname       = "flush",
                .data           = &flush_delay,
                .maxlen         = sizeof(int),
-               .mode           = 0644,
+               .mode           = 0200,
                .proc_handler   = &ipv4_sysctl_rtcache_flush,
                .strategy       = &ipv4_sysctl_rtcache_flush_strategy,
        },