Loading net/ipv6/ip6_tunnel.c +8 −11 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) * ip6_tnl_change() updates the tunnel parameters **/ static int static void ip6_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p) { t->parms.laddr = p->laddr; Loading @@ -1531,29 +1531,25 @@ ip6_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p) t->parms.fwmark = p->fwmark; dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; } static int ip6_tnl_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) static void ip6_tnl_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) { struct net *net = t->net; struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); int err; ip6_tnl_unlink(ip6n, t); synchronize_net(); err = ip6_tnl_change(t, p); ip6_tnl_change(t, p); ip6_tnl_link(ip6n, t); netdev_state_change(t->dev); return err; } static int ip6_tnl0_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) static void ip6_tnl0_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) { /* for default tnl0 device allow to change only the proto */ t->parms.proto = p->proto; netdev_state_change(t->dev); return 0; } static void Loading Loading @@ -1667,9 +1663,9 @@ ip6_tnl_siocdevprivate(struct net_device *dev, struct ifreq *ifr, } else t = netdev_priv(dev); if (dev == ip6n->fb_tnl_dev) err = ip6_tnl0_update(t, &p1); ip6_tnl0_update(t, &p1); else err = ip6_tnl_update(t, &p1); ip6_tnl_update(t, &p1); } if (!IS_ERR(t)) { err = 0; Loading Loading @@ -2091,7 +2087,8 @@ static int ip6_tnl_changelink(struct net_device *dev, struct nlattr *tb[], } else t = netdev_priv(dev); return ip6_tnl_update(t, &p); ip6_tnl_update(t, &p); return 0; } static void ip6_tnl_dellink(struct net_device *dev, struct list_head *head) Loading Loading
net/ipv6/ip6_tunnel.c +8 −11 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,7 @@ static void ip6_tnl_link_config(struct ip6_tnl *t) * ip6_tnl_change() updates the tunnel parameters **/ static int static void ip6_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p) { t->parms.laddr = p->laddr; Loading @@ -1531,29 +1531,25 @@ ip6_tnl_change(struct ip6_tnl *t, const struct __ip6_tnl_parm *p) t->parms.fwmark = p->fwmark; dst_cache_reset(&t->dst_cache); ip6_tnl_link_config(t); return 0; } static int ip6_tnl_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) static void ip6_tnl_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) { struct net *net = t->net; struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id); int err; ip6_tnl_unlink(ip6n, t); synchronize_net(); err = ip6_tnl_change(t, p); ip6_tnl_change(t, p); ip6_tnl_link(ip6n, t); netdev_state_change(t->dev); return err; } static int ip6_tnl0_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) static void ip6_tnl0_update(struct ip6_tnl *t, struct __ip6_tnl_parm *p) { /* for default tnl0 device allow to change only the proto */ t->parms.proto = p->proto; netdev_state_change(t->dev); return 0; } static void Loading Loading @@ -1667,9 +1663,9 @@ ip6_tnl_siocdevprivate(struct net_device *dev, struct ifreq *ifr, } else t = netdev_priv(dev); if (dev == ip6n->fb_tnl_dev) err = ip6_tnl0_update(t, &p1); ip6_tnl0_update(t, &p1); else err = ip6_tnl_update(t, &p1); ip6_tnl_update(t, &p1); } if (!IS_ERR(t)) { err = 0; Loading Loading @@ -2091,7 +2087,8 @@ static int ip6_tnl_changelink(struct net_device *dev, struct nlattr *tb[], } else t = netdev_priv(dev); return ip6_tnl_update(t, &p); ip6_tnl_update(t, &p); return 0; } static void ip6_tnl_dellink(struct net_device *dev, struct list_head *head) Loading