code: func ifaceDown(pIface *net.Interface) error {
  	out, err := ipRunOutput("link show dev %s", pIface.Name)
  	if !strings.Contains(out, "state UP") {
  		return nil
  	}
  
  	// Unlike IPv4, the kernel removes IPv6 addresses when the link goes down. We
  	// don't want that behavior, so we have to preserve the addresses manually.
  	// TODO(angusc): See if we can get a sysctl or something added to the kernel
  	// so we can avoid doing this.
  	ipv6Addrs := make(map[string]*net.Interface)
  	ifaces, err := vlanInterfaces(pIface)
  	if err != nil {
  		return err
  	}
  	ifaces = append(ifaces, pIface)
  	for _, iface := range ifaces {
  		out, err = ipRunOutput("-6 addr show dev %s scope global", iface.Name)
  		for _, line := range strings.Split(out, "\n") {
  			if match := ipv6AddrRegexp.FindStringSubmatch(line); match != nil {
  				ipv6Addrs[match[1]] = iface
  			}
  		}
  	}
  	if err := ifaceFastDown(pIface); err != nil {
  		return err
  	}
  	for addr, iface := range ipv6Addrs {
  		if err := ipRunIface(iface, "addr add %s dev %s", addr, iface.Name); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // ifaceDown sets the interface link state to down and preserves IPv6 addresses
  // for both the given interface and any associated VLAN interfaces.