code: func (e *endpoint) connectRoute(nicid tcpip.NICID, addr tcpip.FullAddress) (stack.Route, tcpip.NICID, tcpip.NetworkProtocolNumber, *tcpip.Error) {
  	netProto, err := e.checkV4Mapped(&addr, false)
  	if err != nil {
  		return stack.Route{}, 0, 0, err
  	}
  
  	localAddr := e.id.LocalAddress
  	if header.IsV4MulticastAddress(addr.Addr) || header.IsV6MulticastAddress(addr.Addr) {
  		if nicid == 0 {
  			nicid = e.multicastNICID
  		}
  		if localAddr == "" {
  			localAddr = e.multicastAddr
  		}
  	}
  
  	// Find a route to the desired destination.
  	r, err := e.stack.FindRoute(nicid, localAddr, addr.Addr, netProto, e.multicastLoop)
  	if err != nil {
  		return stack.Route{}, 0, 0, err
  	}
  	return r, nicid, netProto, nil
  }
docs: // connectRoute establishes a route to the specified interface or the
  // configured multicast interface if no interface is specified and the
  // specified address is a multicast address.