Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.25-rc7 /net/decnet/dn_fib.c

Filename:/net/decnet/dn_fib.c
Lines Added:8
Lines Deleted:2
Also changed in: (Previous) 2.6.25-rc6  2.6.25-rc5  2.6.25-rc4  2.6.25-rc3  2.6.25-rc2  2.6.25-rc1 
(Following) 2.6.25-rc8  2.6.25-rc9  2.6.25  2.6.25-git2  2.6.25-git3  2.6.25-git4 

Location
[  2.6.25-rc7
  [  net
    [  decnet
       o  dn_fib.c

Patch

diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index 3760a20..4aa9a42 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -203,8 +203,6 @@ static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct
       struct flowi fl;
       struct dn_fib_res res;
 
-      memset(&fl, 0, sizeof(fl));
-
       if (nh->nh_flags&RTNH_F_ONLINK) {
          struct net_device *dev;
 
@@ -506,10 +504,14 @@ static int dn_fib_check_attr(struct rtmsg *r, struct rtattr **rta)
 
 static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
+   struct net *net = skb->sk->sk_net;
    struct dn_fib_table *tb;
    struct rtattr **rta = arg;
    struct rtmsg *r = NLMSG_DATA(nlh);
 
+   if (net != &init_net)
+      return -EINVAL;
+
    if (dn_fib_check_attr(r, rta))
       return -EINVAL;
 
@@ -522,10 +524,14 @@ static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *
 
 static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
 {
+   struct net *net = skb->sk->sk_net;
    struct dn_fib_table *tb;
    struct rtattr **rta = arg;
    struct rtmsg *r = NLMSG_DATA(nlh);
 
+   if (net != &init_net)
+      return -EINVAL;
+
    if (dn_fib_check_attr(r, rta))
       return -EINVAL;
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.