Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-drm-fsl-dcu.git] / net / ipv4 / fib_frontend.c
index 9c399a70dd5d5962f3e47ad9e82cae0ae8b46c7b..64f31e63db7f073436a3b805128e0f2df152b5de 100644 (file)
@@ -160,7 +160,7 @@ unsigned inet_addr_type(__be32 addr)
 #ifdef CONFIG_IP_MULTIPLE_TABLES
        res.r = NULL;
 #endif
-       
+
        if (ip_fib_local_table) {
                ret = RTN_UNICAST;
                if (!ip_fib_local_table->tb_lookup(ip_fib_local_table,
@@ -378,7 +378,7 @@ static int rtentry_to_fib_config(int cmd, struct rtentry *rt,
                int len = 0;
 
                mx = kzalloc(3 * nla_total_size(4), GFP_KERNEL);
-               if (mx == NULL)
+               if (mx == NULL)
                        return -ENOMEM;
 
                if (rt->rt_flags & RTF_MTU)
@@ -400,7 +400,7 @@ static int rtentry_to_fib_config(int cmd, struct rtentry *rt,
 /*
  *     Handle IP routing ioctl calls. These are used to manipulate the routing tables
  */
+
 int ip_rt_ioctl(unsigned int cmd, void __user *arg)
 {
        struct fib_config cfg;
@@ -482,9 +482,7 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh,
        memset(cfg, 0, sizeof(*cfg));
 
        rtm = nlmsg_data(nlh);
-       cfg->fc_family = rtm->rtm_family;
        cfg->fc_dst_len = rtm->rtm_dst_len;
-       cfg->fc_src_len = rtm->rtm_src_len;
        cfg->fc_tos = rtm->rtm_tos;
        cfg->fc_table = rtm->rtm_table;
        cfg->fc_protocol = rtm->rtm_protocol;
@@ -501,9 +499,6 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh,
                case RTA_DST:
                        cfg->fc_dst = nla_get_be32(attr);
                        break;
-               case RTA_SRC:
-                       cfg->fc_src = nla_get_be32(attr);
-                       break;
                case RTA_OIF:
                        cfg->fc_oif = nla_get_u32(attr);
                        break;
@@ -605,7 +600,7 @@ int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
                                goto next;
                        if (dumped)
                                memset(&cb->args[2], 0, sizeof(cb->args) -
-                                                2 * sizeof(cb->args[0]));
+                                                2 * sizeof(cb->args[0]));
                        if (tb->tb_dump(tb, skb, cb) < 0)
                                goto out;
                        dumped = 1;
@@ -771,10 +766,10 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa)
 
 static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
 {
-       
+
        struct fib_result       res;
-       struct flowi            fl = { .nl_u = { .ip4_u = { .daddr = frn->fl_addr, 
-                                                           .fwmark = frn->fl_fwmark,
+       struct flowi            fl = { .mark = frn->fl_mark,
+                                      .nl_u = { .ip4_u = { .daddr = frn->fl_addr,
                                                            .tos = frn->fl_tos,
                                                            .scope = frn->fl_scope } } };
        if (tb) {
@@ -796,11 +791,11 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
 static void nl_fib_input(struct sock *sk, int len)
 {
        struct sk_buff *skb = NULL;
-        struct nlmsghdr *nlh = NULL;
+       struct nlmsghdr *nlh = NULL;
        struct fib_result_nl *frn;
-       u32 pid;     
+       u32 pid;
        struct fib_table *tb;
-       
+
        skb = skb_dequeue(&sk->sk_receive_queue);
        nlh = (struct nlmsghdr *)skb->data;
        if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||
@@ -808,18 +803,17 @@ static void nl_fib_input(struct sock *sk, int len)
                kfree_skb(skb);
                return;
        }
-       
+
        frn = (struct fib_result_nl *) NLMSG_DATA(nlh);
        tb = fib_get_table(frn->tb_id_in);
 
        nl_fib_lookup(frn, tb);
-       
+
        pid = nlh->nlmsg_pid;           /*pid of sending process */
        NETLINK_CB(skb).pid = 0;         /* from kernel */
-       NETLINK_CB(skb).dst_pid = pid;
        NETLINK_CB(skb).dst_group = 0;  /* unicast */
        netlink_unicast(sk, skb, pid, MSG_DONTWAIT);
-}    
+}
 
 static void nl_fib_lookup_init(void)
 {