Menu

#123 TIPC create udp socket with INADDR_ANY

None
closed
None
5
2018-07-03
2017-10-12
Su Yu
No

TIPC create udp socket with INADDR_ANY

When I enable bearer with media UDP, there is udp socke created with s_addr INADDR_ANY.
Can I change the addr to a specified ip like 192.168.1.1
udp 0 0 0.0.0.0:6118 0.0.0.0:*
Thanks

Related

Tasks: #123

Discussion

  • Jon Paul Maloy

    Jon Paul Maloy - 2017-10-12

    Hi,
    You must attach to an interface which already has an IP (-v4 or -v6) address.
    Example:

    On one node:

    node1 ~ # modprobe tipc
    node1 ~ # tipc no set addr 1.1.1
    node1 ~ # tipc be en me udp name udp1 localip 192.168.123.101

    on another node:

    node2 ~ # modprobe tipc
    node2 ~ # tipc no set addr 1.1.2
    node2 ~ # tipc be en me udp name udp1 localip 192.168.123.102

    Then check if a link came up:

    node2 ~ # tipc l l
    broadcast-link: up
    1.1.2:udp1-1.1.1:udp1: up

    BR
    ///jon

    From: Su Yu [mailto:feather@users.sf.net]
    Sent: Thursday, October 12, 2017 09:47
    To: Ticket 123 123@bugs.tipc.p.re.sf.net
    Subject: [tipc:bugs] #123 TIPC create udp socket with INADDR_ANY


    [bugs:#123]https://sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

    Status: open
    Group:
    Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
    Last Updated: Thu Oct 12, 2017 07:46 AM UTC
    Owner: nobody

    TIPC create udp socket with INADDR_ANY

    When I enable bearer with media UDP, there is udp socke created with s_addr INADDR_ANY.
    Can I change the addr to a specified ip like 192.168.1.1
    udp 0 0 0.0.0.0:6118 0.0.0.0:*
    Thanks


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/tipc/bugs/123/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     
    • Erik Hugne

      Erik Hugne - 2017-10-12

      Or you can substitute the ip for an ethernet device name. Unless that have
      changed.

      //E

      On 12 Oct 2017 10:46 am, "Jon Paul Maloy" jonmaloy@users.sf.net wrote:

      Hi,
      You must attach to an interface which already has an IP (-v4 or -v6)
      address.
      Example:

      On one node:

      node1 ~ # modprobe tipc
      node1 ~ # tipc no set addr 1.1.1
      node1 ~ # tipc be en me udp name udp1 localip 192.168.123.101

      on another node:

      node2 ~ # modprobe tipc
      node2 ~ # tipc no set addr 1.1.2
      node2 ~ # tipc be en me udp name udp1 localip 192.168.123.102

      Then check if a link came up:

      node2 ~ # tipc l l
      broadcast-link: up
      1.1.2:udp1-1.1.1:udp1: up

      BR
      ///jon

      From: Su Yu [mailto:feather@users.sf.net]
      Sent: Thursday, October 12, 2017 09:47
      To: Ticket 123 123@bugs.tipc.p.re.sf.net
      Subject: [tipc:bugs] #123 TIPC create udp socket with INADDR_ANY


      [bugs:#123] https://sourceforge.net/p/tipc/bugs/123/https://
      sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

      Status: open
      Group:
      Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
      Last Updated: Thu Oct 12, 2017 07:46 AM UTC
      Owner: nobody

      TIPC create udp socket with INADDR_ANY

      When I enable bearer with media UDP, there is udp socke created with
      s_addr INADDR_ANY.
      Can I change the addr to a specified ip like 192.168.1.1
      udp 0 0 0.0.0.0:6118 0.0.0.0:*
      Thanks


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/tipc/bugs/123/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/


      Status: open
      Group:
      Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
      Last Updated: Thu Oct 12, 2017 07:46 AM UTC
      Owner: nobody

      TIPC create udp socket with INADDR_ANY

      When I enable bearer with media UDP, there is udp socke created with
      s_addr INADDR_ANY.
      Can I change the addr to a specified ip like 192.168.1.1
      udp 0 0 0.0.0.0:6118 0.0.0.0:*
      Thanks


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/tipc/bugs/123/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Jon Paul Maloy

        Jon Paul Maloy - 2018-07-02

        See Erik's comment below. Is this correct?
        I tried this:
        node1 ~ # tipc be en me udp name udp1 dev eth0
        but to no avail.

        Before looking more into the code I would like to know if anybody has made this work.
        And even if it doesn't it is not a bad idea.
        If it is implemented, but broken, we should fix it. Otherwise we should implement it.

        ///jon

        -----Original Message-----

        From: Erik Hugne ehugne@users.sf.net
        Sent: Thursday, 12 October, 2017 05:28
        To: [tipc:bugs] 123@bugs.tipc.p.re.sf.net
        Subject: [tipc:bugs] Re: #123 TIPC create udp socket with INADDR_ANY

        Or you can substitute the ip for an ethernet device name. Unless that have
        changed.

        //E

        On 12 Oct 2017 10:46 am, "Jon Paul Maloy" jonmaloy@users.sf.net jonmaloy@users.sf.net wrote:

        Hi,
        You must attach to an interface which already has an IP (-v4 or -v6)
        address.
        Example:

        On one node:

        node1 ~ # modprobe tipc
        node1 ~ # tipc no set addr 1.1.1
        node1 ~ # tipc be en me udp name udp1 localip 192.168.123.101

        on another node:

        node2 ~ # modprobe tipc
        node2 ~ # tipc no set addr 1.1.2
        node2 ~ # tipc be en me udp name udp1 localip 192.168.123.102

        Then check if a link came up:

        node2 ~ # tipc l l
        broadcast-link: up
        1.1.2:udp1-1.1.1:udp1: up

        BR
        ///jon

        From: Su Yu [mailto:feather@users.sf.net]
        Sent: Thursday, October 12, 2017 09:47
        To: Ticket 123 123@bugs.tipc.p.re.sf.net
        Subject: [tipc:bugs] #123 TIPC create udp socket with INADDR_ANY


        [bugs:#123] https://sourceforge.net/p/tipc/bugs/123/ https://sourceforge.net/p/tipc/bugs/123/https://
        sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

        Status: open
        Group:
        Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
        Last Updated: Thu Oct 12, 2017 07:46 AM UTC
        Owner: nobody

        TIPC create udp socket with INADDR_ANY

        When I enable bearer with media UDP, there is udp socke created with
        s_addr INADDR_ANY.
        Can I change the addr to a specified ip like 192.168.1.1
        udp 0 0 0.0.0.0:6118 0.0.0.0:*
        Thanks


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/tipc/bugs/123/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/


        Status: open
        Group:
        Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
        Last Updated: Thu Oct 12, 2017 07:46 AM UTC
        Owner: nobody

        TIPC create udp socket with INADDR_ANY

        When I enable bearer with media UDP, there is udp socke created with
        s_addr INADDR_ANY.
        Can I change the addr to a specified ip like 192.168.1.1
        udp 0 0 0.0.0.0:6118 0.0.0.0:*
        Thanks


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/tipc/bugs/123/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/


        [bugs:#123] https://sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

        Status: open
        Group:
        Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
        Last Updated: Thu Oct 12, 2017 07:46 AM UTC
        Owner: nobody

        TIPC create udp socket with INADDR_ANY

        When I enable bearer with media UDP, there is udp socke created with s_addr INADDR_ANY.
        Can I change the addr to a specified ip like 192.168.1.1
        udp 0 0 0.0.0.0:6118 0.0.0.0:*
        Thanks


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/tipc/bugs/123/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         

        Related

        Tasks: #123

  • Su Yu

    Su Yu - 2017-10-12

    Thank you very much for your reply.
    Actually, in my env, all the tipc link is created, everythink is ok.
    But only one thing confuse me.

    After enable the bearer with UDP like below:
    xx-0 computer:
    tipc be en me udp name udp1 localip 192.168.1.3

    xx-1 computer
    tipc be en me udp name udp1 localip 192.168.1.4

    In the computer , such as xx-0,
    TIPC will listen at 0.0.0.0:6118
    netstat -anp
    udp 0 0 0.0.0.0:6118 0.0.0.0:*
    But I only hope the 192.168.1.3:6118 is listend.

    Thanks.

     
  • Su Yu

    Su Yu - 2017-10-13

    I just check the tipc code.
    when tipc udp enable, it hard code the INADDR_ANY as local_ip.s_addr.
    udp_conf.local_ip.s_addr = htonl(INADDR_ANY); [ tipc_udp_enable(), udp_media.c]
    it won't use the local ip in the tipc config cmd:
    tipc be en me udp name udp1 localip 192.168.123.101

    So if tipc udp enable, it only listen 0.0.0.0:6118
    netstat anp | grep 6118
    udp 0 0 0.0.0.0:6118 0.0.0.0:*

    Is it right?

    Thanks.

     
    • Jon Paul Maloy

      Jon Paul Maloy - 2017-10-13

      From: Su Yu [mailto:feather@users.sf.net]
      Sent: Friday, October 13, 2017 09:20
      To: [tipc:bugs] 123@bugs.tipc.p.re.sf.net
      Subject: [tipc:bugs] #123 TIPC create udp socket with INADDR_ANY

      I just check the tipc code.
      when tipc udp enable, it hard code the INADDR_ANY as local_ip.s_addr.
      udp_conf.local_ip.s_addr = htonl(INADDR_ANY); [ tipc_udp_enable(), udp_media.c]
      it won't use the local ip in the tipc config cmd:
      tipc be en me udp name udp1 localip 192.168.123.101

      So if tipc udp enable, it only listen 0.0.0.0:6118
      netstat anp | grep 6118
      udp 0 0 0.0.0.0:6118 0.0.0.0:*

      Is it right?

      Not sure. I don't have time to check this further right now, but you could try to bind to a different interfaces/subnets on two peer nodes and see what happens. Foe Ethernet bearers we assume they are connected to logically separated subnets, and I suspect the UDP bearer was designed under the same assumption.

      ///jon

      Thanks.


      [bugs:#123]https://sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

      Status: open
      Group:
      Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
      Last Updated: Thu Oct 12, 2017 10:16 AM UTC
      Owner: nobody

      TIPC create udp socket with INADDR_ANY

      When I enable bearer with media UDP, there is udp socke created with s_addr INADDR_ANY.
      Can I change the addr to a specified ip like 192.168.1.1
      udp 0 0 0.0.0.0:6118 0.0.0.0:*
      Thanks


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/tipc/bugs/123/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Jon Paul Maloy

    Jon Paul Maloy - 2018-05-22
    • status: open --> closed
    • assigned_to: Jon Paul Maloy
    • Group: -->
     
  • Jon Paul Maloy

    Jon Paul Maloy - 2018-05-22

    Support request answered.

     
  • Hoang Le Huu

    Hoang Le Huu - 2018-07-03

    Hi Jon,

    Erik's comment is correct! At currently, we can't use ethernet device name for media udp.

    Regards,
    Hoang

     
    • Jon Paul Maloy

      Jon Paul Maloy - 2018-07-03

      Hi Hoang,
      Forgot to ask you about this this morning, as your response is a little contradictory.
      Erik's comment says that this is possible, while your answer implies it is not.
      Which is correct?

      Regards
      ///jon

      -----Original Message-----
      From: Hoang Le lhhoang@users.sourceforge.net
      Sent: Tuesday, 03 July, 2018 00:10
      To: [tipc:bugs] 123@bugs.tipc.p.re.sourceforge.net
      Subject: [tipc:bugs] #123 TIPC create udp socket with INADDR_ANY

      Hi Jon,

      Erik's comment is correct! At currently, we can't use ethernet device name for media udp.

      Regards,
      Hoang


      [bugs:#123] https://sourceforge.net/p/tipc/bugs/123/ TIPC create udp socket with INADDR_ANY

      Status: closed
      Group:
      Created: Thu Oct 12, 2017 07:46 AM UTC by Su Yu
      Last Updated: Tue May 22, 2018 02:14 PM UTC
      Owner: Jon Paul Maloy

      TIPC create udp socket with INADDR_ANY

      When I enable bearer with media UDP, there is udp socke created with s_addr INADDR_ANY.
      Can I change the addr to a specified ip like 192.168.1.1
      udp 0 0 0.0.0.0:6118 0.0.0.0:*
      Thanks


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/tipc/bugs/123/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Tasks: #123

  • Hoang Le Huu

    Hoang Le Huu - 2018-07-03

    Hi Jon,

    So far, this function is not available at TIPC upstream as well as iproute2.
    Probably, Erik mentioned this on some other development branch.

    Regards,
    Hoang

     

Log in to post a comment.