linux – L2TP on Yocto project can not find tunnel

I have a problem with l2tpvpn on yocto project. My server on ubuntu 18.04 and i have set it up client on ubuntu and have run successfully but with yocto it lose.
when I run the command /etc/init.d/xl2tpd restart don’t have any established on netstart.
I need help. If you have any ideas. thanks.

ip server: 192.168.1.11
ip client yocto: 192.168.1.5

/etc/xl2tpd/xl2tpd.conf

(lac qavpn)
lns = 192.168.1.11
redial = yes
autodial = yes
require chap = yes
refuse pap = yes
require authentication = yes
ppp debug = yes
pppoptfile = /etc/ppp/options.l2tpd.client
length bit = yes

/etc/ppp/options.l2tpd.client

ipcp-accept-local
ipcp-accept-remote
mtu 1410
mru 1410
noccp
noauth
idle 1800
defaultroute
192.168.20.1:192.168.20.10
debug
usepeerdns
proxyarp
connect-delay 5000
name atsjsc
password ats123

cat /var/log/messege

Jul 15 09:45:01 ccimx6ulstarter daemon.crit xl2tpd(17451): death_handler: Fatal signal 15 received
Jul 15 09:45:02 ccimx6ulstarter daemon.crit xl2tpd(17499): setsockopt recvref(30): Protocol not available
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17499): This binary does not support kernel L2TP.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): xl2tpd version xl2tpd-1.3.9 started on ccimx6ulstarter PID:17500
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Forked by Scott Balmos and David Stipp, (C) 2001
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Inherited by Jeff McAdams, (C) 2002
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Forked again by Xelerance (www.xelerance.com) (C) 2006-2016
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Listening on IP address 0.0.0.0, port 1701
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Connecting to host 192.168.1.11, port 1701
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Connection established to 192.168.1.11, 1701.  Local: 53191, Remote: 19445 (ref=0/0).
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Calling on tunnel 53191
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Connection established to 192.168.1.11, 1701.  Local: 53191, Remote: 19445 (ref=0/0).
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Calling on tunnel 53191
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Call established with 192.168.1.11, Local: 15216, Remote: 62372, Serial: 1 (ref=0/0)
Jul 15 09:45:02 ccimx6ulstarter daemon.notice xl2tpd(17500): Call established with 192.168.1.11, Local: 15216, Remote: 62372, Serial: 1 (ref=0/0)
Jul 15 09:45:02 ccimx6ulstarter daemon.warn xl2tpd(17500): start_pppd: PPP already started on call!
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): control_finish: Connection closed to 192.168.1.11, port 1701 (), Local: 53191, Remote: 19445
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)
Jul 15 09:45:02 ccimx6ulstarter daemon.debug xl2tpd(17500): network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 53191 Dumping.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)
Jul 15 09:45:02 ccimx6ulstarter daemon.debug xl2tpd(17500): network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 53191 Dumping.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)
Jul 15 09:45:02 ccimx6ulstarter daemon.debug xl2tpd(17500): network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 53191 Dumping.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)
Jul 15 09:45:02 ccimx6ulstarter daemon.debug xl2tpd(17500): network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 53191 Dumping.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)
Jul 15 09:45:02 ccimx6ulstarter daemon.debug xl2tpd(17500): network_thread: unable to find call or tunnel to handle packet.  call = 0, tunnel = 53191 Dumping.
Jul 15 09:45:02 ccimx6ulstarter daemon.info xl2tpd(17500): Can not find tunnel 53191 (refhim=0)

=============================================================

This is the server connection

root@ubuntu:~# netstat -apn|grep xl2tpd
udp        0      0 192.168.1.11:1701       192.168.1.10:1701       ESTABLISHED 3408/xl2tpd         
udp        0      0 192.168.1.11:1701       192.168.1.5:1701        ESTABLISHED 3408/xl2tpd         
udp        0      0 192.168.1.11:1701       192.168.1.5:1701        ESTABLISHED 3408/xl2tpd         
udp        0      0 0.0.0.0:1701            0.0.0.0:*                           3408/xl2tpd         
unix  2      ( )         DGRAM                    70609    3408/xl2tpd ``

Jul 15 02:45:32 ubuntu xl2tpd(3558): control_finish: Peer requested tunnel 28727 twice, ignoring second one.
Jul 15 02:45:32 ubuntu xl2tpd(3558): Connection established to 192.168.1.5, 1701.  Local: 22292, Remote: 28727 (ref=0/0).  LNS session is 'default'
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 1, expected 2)
Jul 15 02:45:32 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 2, expected 3)
Jul 15 02:45:32 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:45:32 ubuntu xl2tpd(3558): message_type_avp: attempting to negotiate SCCCN with state != SCCRP!
Jul 15 02:45:32 ubuntu xl2tpd(3558): handle_avps: Bad exit status handling attribute 0 (Message Type) on mandatory packet.
Jul 15 02:45:32 ubuntu xl2tpd(3558): Connection 28727 closed to 192.168.1.5, port 1701 ()
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 3, expected 4)
Jul 15 02:45:32 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 4, expected 5)
Jul 15 02:45:32 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:45:32 ubuntu xl2tpd(3558): get_call: can't find call 24915 in tunnel 22292#012 (ref=0/0)
Jul 15 02:45:32 ubuntu xl2tpd(3558): get_call: can't find call 24915 in tunnel 22292#012 (ref=0/0)
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 5, expected 6)
Jul 15 02:45:32 ubuntu xl2tpd(3558): get_call: can't find call 24915 in tunnel 22292#012 (ref=0/0)
Jul 15 02:45:32 ubuntu xl2tpd(3558): get_call: can't find call 24915 in tunnel 22292#012 (ref=0/0)
Jul 15 02:45:32 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 28727 (got 6, expected 7)
Jul 15 02:45:39 ubuntu dhclient(2813): DHCPREQUEST of 192.168.1.11 on ens33 to 192.168.1.1 port 67 (xid=0x31c7cd77)
Jul 15 02:45:47 ubuntu dhclient(2813): DHCPREQUEST of 192.168.1.11 on ens33 to 192.168.1.1 port 67 (xid=0x31c7cd77)
Jul 15 02:45:57 ubuntu pppd(3577): sent (LCP EchoReq id=0x1 magic=0xecca1a2c)
Jul 15 02:45:57 ubuntu pppd(3577): rcvd (LCP EchoReq id=0x1 magic=0x239bd899)
Jul 15 02:45:57 ubuntu pppd(3577): sent (LCP EchoRep id=0x1 magic=0xecca1a2c)
Jul 15 02:45:57 ubuntu pppd(3577): rcvd (LCP EchoRep id=0x1 magic=0x239bd899)
Jul 15 02:46:00 ubuntu dhclient(2813): DHCPREQUEST of 192.168.1.11 on ens33 to 192.168.1.1 port 67 (xid=0x31c7cd77)
Jul 15 02:46:02 ubuntu xl2tpd(3558): control_finish: Peer requested tunnel 32893 twice, ignoring second one.
Jul 15 02:46:02 ubuntu xl2tpd(3558): Connection established to 192.168.1.5, 1701.  Local: 37223, Remote: 32893 (ref=0/0).  LNS session is 'default'
Jul 15 02:46:02 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 32893 (got 1, expected 2)
Jul 15 02:46:02 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:46:02 ubuntu xl2tpd(3558): message_type_avp: attempting to negotiate SCCCN with state != SCCRP!
Jul 15 02:46:02 ubuntu xl2tpd(3558): handle_avps: Bad exit status handling attribute 0 (Message Type) on mandatory packet.
Jul 15 02:46:02 ubuntu xl2tpd(3558): Connection 32893 closed to 192.168.1.5, port 1701 ()
Jul 15 02:46:02 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 32893 (got 2, expected 4)
Jul 15 02:46:02 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:46:02 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 32893 (got 3, expected 4)
Jul 15 02:46:02 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:46:02 ubuntu xl2tpd(3558): check_control: Received out of order control packet on tunnel 32893 (got 4, expected 5)
Jul 15 02:46:02 ubuntu xl2tpd(3558): handle_packet: bad control packet!
Jul 15 02:46:02 ubuntu xl2tpd(3558): get_call: can't find call 57392 in tunnel 37223#012 (ref=0/0)
Jul 15 02:46:02 ubuntu xl2tpd(3558): get_call: can't find call 57392 in tunnel 37223#012 (ref=0/0)

godot – Add a sound to all the buttons in a project

Is there an option on the texture_button or something like that where you can specify a sound to be played on button-press. I have created a global sound_manager but for the button presses, I have to manually code it everywhere the script has a button_pressed signal. Or some kind of logic that when a button is pressed anywhere in the project, sound_manager plays a particular sound.

development process – Is it okay replacing the waterfall methodology with prototyping in the middle of a large project?

Suppose that you are a project manager using the waterfall development methodology on a large and complex project. Your manager has just read the latest article in Computerworld that advocates replacing the waterfall methodology with prototyping and comes to your office requesting you to switch. What do you say?

c# – Is this way of handling events in a Xamarin project memory safe?

I inherited a Xamarin project and I’m trying to find my way. The first task I completed involved creating a new reusable view and adding it to an existing screen. This was iOS specific, so I went and created a new .xib file to add in the relevant storyboard. I had some trouble figuring out how to attach the outlets correctly and I didn’t see my view so I added it programmatically, but in the end I got it working. However I ended up using the following code that concerns me a bit:

    // TableviewSearchbarHeader.designer.cs
    (Register ("TableviewSearchbarHeader"))
    partial class TableviewSearchbarHeader
    {
        (Outlet)
        UIKit.UIButton ClearSelectionButton { get; set; }
    }

    // TableviewSearchbarHeader.cs
    public void SetOnClearSelectionButtonPressed(EventHandler OnClearSelectionButtonPressed)
    {
        ClearSelectionButton.TouchUpInside += OnClearSelectionButtonPressed;
    }

    // MyViewController.cs
    public override void ViewDidLoad()
    {
        TableviewSearchbarHeader.SetOnClearSelectionButtonPressed(OnClearSelectionButtonPressed);
    }
    private void OnClearSelectionButtonPressed(object sender, EventArgs e)
    {
        Presenter.ResetFilter(this);
    }

The outlet is not accessible from the VC. So I had to create an entry point for the VC to assign its delegate implementation. But how can I be sure this will not cause a memory leak? This just seems like a code smell, but I couldn’t figure out a better way and the docs aren’t helpful.

What can I improve?

Can I target 20-25 locations in an SEO project and how?

Can I target 20-25 locations in an SEO project and how? please share some SEO techniques for higher rankings For keywords location.

nosql – Which database system should I use for my startup project

Let me describe a model I want to have:

  • Company – everything belongs to a company, I need to support multiple companies (clients)
  • Device – data about a hardware used in the system
  • DeviceClassification – describes the ways I can segment devices
  • DeviceGroup – for a given DeviceClassification I can make groups tree and to store device in one group of that classification. There are top level groups with children.
  • DeviceLocation – country, state, city, zip code, address, geo location
  • MediaResource – a media file (image, video)
  • Playlist – list of media resources and additional data for playlist behavior. Playlist can be assigned to many device groups.
  • PlaylistItem – references a media resource and describes how that resource is being used

Above that I will need data store to support authentication, authorization and license checking for clients.

There should be a “table” for storing some data to be consumed by BI systems.

My question is: Would I be wrong if I used NoSql database like ArangoDB or Neo4j, and which one is better for my use case? Or I should stick with relational database?
I am exploring NoSql databases and I want to try something new. I will develop my project in .NET.

Creating new project with mandatory custom lookup fields via CSOM

I have to create new project with required custom lookup fields via CSOM and I have got the CustomFieldRequiredValueNotProvided exception. Here is my code. What am I doing wrong?


using (ProjectContext projectContext = new ProjectContext(url))
{

        projectContext.Credentials = manager.GetNetworkCredential();
        projectContext.Load(projectContext.EnterpriseProjectTypes);
        projectContext.ExecuteQuery();

        projectContext.Load(projectContext.LookupTables);
        projectContext.ExecuteQuery();
        var lookupTables = projectContext.LookupTables.ToList();

        projectContext.Load(projectContext.CustomFields);
        projectContext.ExecuteQuery();
        var customFields = projectContext.CustomFields.ToList();

        var customFieldDepartment = customFields.Where(x => x.Name == "cfName1").First();
        var customFieldCustomer = customFields.Where(x => x.Name == "cfName2").First();

        LookupTable lookupTableDepartments = projectContext.LookupTables.First(x => x.Name == "ltName1");
        projectContext.Load(lookupTableDepartments.Entries);
        projectContext.ExecuteQuery();

        LookupTable lookupTableCustomers = projectContext.LookupTables.First(x => x.Name == "ltName2");
        projectContext.Load(lookupTableCustomers.Entries);
        projectContext.ExecuteQuery();

        var department = lookupTableDepartments.Entries.ToList().First();
        var customer = lookupTableCustomers.Entries.ToList().First();

        var enterpriseProjectType = projectContext.EnterpriseProjectTypes.Where(x => x.Name == "eptName").First();

        var project = projectContext.Projects.Add(new ProjectCreationInformation
        {
                Id = Guid.NewGuid(),
                Name = "CSOM Project name",
                EnterpriseProjectTypeId = enterpriseProjectType.Id,
                Start = DateTime.Now
        });

        string departmentInternalName = customFieldDepartment.InternalName;
        string customerInternalName = customFieldCustomer.InternalName;
        string departmentInternalValue = department.InternalName;
        string customerInternalValue = customer.InternalName;

        project(departmentInternalName) = new string() { departmentInternalName };
        project(customerInternalName) = new string() { customerInternalValue };

        var job = projectContext.Projects.Update();
        var jobState = projectContext.WaitForQueue(job, 60);
}

Paassword generator project in Python

A few days ago I posted my password generator project to help me learn and become more comfortable. I got a lot of great replies from that and I’ve sense updated and would love another look at the program.

I’ve made it so that I can import it and use it to generator a password. I’ve also added support for completely custom subsets of characters.

Throw any suggests or comments you have! Anything is welcome.

import string
from string import ascii_lowercase
from string import ascii_uppercase
from string import digits as numeric
from string import punctuation
import secrets
import argparse
from argparse import HelpFormatter

def generate_characters(character_set, character_amount):
    for _ in range(0, character_amount):
        yield secrets.choice(character_set)

def shuffle(input_str):
    output = ""
    for _ in range(0, len(input_str)):
        index = secrets.randbelow(len(input_str))
        output += "".join(input_str(index))
        input_str = "".join((input_str(:index), input_str(index + 1 :)))
    return output

def generate_password(password_length,
                      subset_lowercase=ascii_lowercase, subset_uppercase=ascii_uppercase,
                      subset_numeric=numeric, subset_special="!@#$%^&*",
                      min_lowercase=1, min_uppercase=1,
                      min_numeric=1, min_special=1):
    superset = "".join((subset_lowercase, subset_uppercase, subset_numeric, subset_special))
    password = "".join(generate_characters(subset_lowercase, min_lowercase))
    password += "".join(generate_characters(subset_uppercase, min_uppercase))
    password += "".join(generate_characters(subset_numeric, min_numeric))
    password += "".join(generate_characters(subset_special, min_special))
    password += "".join(generate_characters(superset, password_length-len(password)))
    return shuffle(password)

if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        formatter_class=HelpFormatter,
        description="Generates a password",
        usage="")

    parser.add_argument(
        "-len",
        "--length",
        type=int,
        default=24,
        dest="password_length",
        help="Length of the generated password")
    parser.add_argument(
        "-lc",
        "--lower",
        type=int,
        default=1,
        dest="min_lowercase",
        help="Minimum number of lowercase alpha characters")
    parser.add_argument(
        "-uc",
        "--upper",
        type=int,
        default=1,
        dest="min_uppercase",
        help="Minimum number of uppercase alpha characters")
    parser.add_argument(
        "-num",
        "--numeric",
        type=int,
        default=1,
        dest="min_numeric",
        help="Minimum number of numeric characters")
    parser.add_argument(
        "-sp",
        "--special",
        type=int,
        default=1,
        dest="min_special",
        help="Minimum number of special characters")
    parser.add_argument(
        "-ext",
        "--extended",
        action="store_const",
        default=False,
        const=True,
        dest="special_extended",
        help="Toggles the extended special character subset. Passwords may not be accepted by all services")
    parser.add_argument(
        "-sl",
        "--subset_lower",
        type=str,
        default=ascii_lowercase,
        dest="subset_lower",
        help="Allows for a custom subset of lowercase characters")
    parser.add_argument(
        "-su",
        "--subset_upper",
        type=str,
        default=ascii_uppercase,
        dest="subset_upper",
        help="Allows for a custom subset of uppercase characters")
    parser.add_argument(
        "-sn",
        "--subset_numeric",
        type=str,
        default=numeric,
        dest="subset_numeric",
        help="Allows for a custom subset of numeric characters")
    parser.add_argument(
        "-ss",
        "--subset_special",
        default="",
        type=str,
        dest="subset_special",
        help="Allows for a custom subset of special characters")

    args = parser.parse_args()

    if args.subset_special:
        special = args.subset_special
    elif args.special_extended:
        special = punctuation
    else:
        special = "!@#$%^&*"

    generated_password = generate_password(
        args.password_length,
        args.subset_lower,
        args.subset_upper,
        args.subset_numeric,
        special,
        args.min_lowercase,
        args.min_uppercase,
        args.min_numeric,
        args.min_special,
    )

    print("Password:", generated_password)

Looking for someone to help with a software research project

We are working on a project and we need someone to help us research the software/script that can help us getting it done. (I suppose this is more like a VA type work)

We already have a couple software in mind and we will be paying for it. Just need someone to actually research and run the software to make sure it does exactly what we need.

If you are interested, add me on skype at Walaboom and I will give you more details and we can discuss the pay rate.
SEMrush

Thank you~

 

unity3d – C# : How to indicate that a supposedly unused method is being used from outside the project?

I am using Unity in combination with other platforms such as Android and iOS. There are methods in my Unity script that are called from Android or iOS such as

public void ApplyEffect()
{
    //Some code
}

This method is only called from Android or iOS and not referenced within the Unity code. As a result, I see the warning

Method 'ApplyEffect' is never used

But more importantly, these methods are confusing to other people as it gives the impression that these methods aren’t being used.

I would like to have a way to indicate that these methods are being used so that someone doesn’t remove them by mistake. I feel having some representation would make the code more readable too. But how do I do it?

Jetbrains Rider has a UsedImplicitly annotation which looks perfect but I think it may not work on other editors. Commenting is one option but that doesn’t seem like a good solution.

Any suggestions? Thanks!