Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec...
[cascardo/linux.git] / net / ipv6 / sit.c
index a24557a..213546b 100644 (file)
@@ -1241,7 +1241,8 @@ ipip6_tunnel_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                        if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
                                goto done;
                        err = -ENOENT;
-                       if ((t = ipip6_tunnel_locate(net, &p, 0)) == NULL)
+                       t = ipip6_tunnel_locate(net, &p, 0);
+                       if (t == NULL)
                                goto done;
                        err = -EPERM;
                        if (t == netdev_priv(sitn->fb_tunnel_dev))
@@ -1711,7 +1712,7 @@ static int ipip6_fill_info(struct sk_buff *skb, const struct net_device *dev)
            nla_put_u16(skb, IFLA_IPTUN_ENCAP_DPORT,
                        tunnel->encap.dport) ||
            nla_put_u16(skb, IFLA_IPTUN_ENCAP_FLAGS,
-                       tunnel->encap.dport))
+                       tunnel->encap.flags))
                goto nla_put_failure;
 
        return 0;
@@ -1836,8 +1837,8 @@ static int __net_init sit_init_net(struct net *net)
                goto err_dev_free;
 
        ipip6_tunnel_clone_6rd(sitn->fb_tunnel_dev, sitn);
-
-       if ((err = register_netdev(sitn->fb_tunnel_dev)))
+       err = register_netdev(sitn->fb_tunnel_dev);
+       if (err)
                goto err_reg_dev;
 
        t = netdev_priv(sitn->fb_tunnel_dev);