Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNetwork - implement IPv6 #7030

Closed
wants to merge 42 commits into from
Closed

CNetwork - implement IPv6 #7030

wants to merge 42 commits into from

Commits on Jan 8, 2017

  1. Copy the full SHA
    5ab9810 View commit details
    Browse the repository at this point in the history
  2. [osx] Private netlink.h copy from Linux. OSX provides netlink interface

          and calls, but doesn't provide .h files.
          Having this, we can further simplify OSX/Android/Linux networking
          code - same API will be used across all three platforms - less #ifdefs
    mk01 committed Jan 8, 2017
    Copy the full SHA
    8b63155 View commit details
    Browse the repository at this point in the history
  3. [TCPServer] Propery shutdown connection / close sockets and clear err…

    …ors.
    
                Otherwise the ES can't rebind on crash/fast restart.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    846a62b View commit details
    Browse the repository at this point in the history
  4. [CNetwork] Create new helper methods needed for IPv6 stack

               implementation and easy IPv6/v4 address manipulation.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    8d841b0 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    f54064e View commit details
    Browse the repository at this point in the history
  6. [CNetwork] Replace all existing loops over m_interfaces vector with C…

    …++11
    
               very simple 'for(auto)' construction.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    47f936a View commit details
    Browse the repository at this point in the history
  7. [CNetwork] current WOL implementation can't be updated for IPv6

               as it's working mechanism changed completely (IPv6 has no ARP).
               Comment accordingly in Network.h, make those calls safe by returning
               false immediatelly upon call when host has only IPv6 configuration.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    1b0b85f View commit details
    Browse the repository at this point in the history
  8. [CNetwork/NetworkLinux/W32] update PingHost() functions to IPv6 compa…

    …tibility.
    
              - CNetwork::ConnectHostPort() and CNetwork::PingHost() were updated
                for full IPv6/IPv4 compatibility. IP host address parameter changed
                to std::string and created wrapper for old call via hostip as ulong.
              - Linux implementation for PingHost was updated to use ping/ping6
                as needed
              - W32 impl was aligned to changed function template, on IPv6 host param
                returns false, no change otherwise.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    3ccd244 View commit details
    Browse the repository at this point in the history
  9. [CNetwork] Provide more detailed debugging info inside CreateTCPServe…

    …rSocket()
    
               function - include port and text of current error.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    76f9ba2 View commit details
    Browse the repository at this point in the history
  10. [IAnnouncer] create new announcer Network and emessage

    [CNetwork]   NETWORK_CHANGED. if triggered, all Services are
                 asked to restart to rebind onto new network
                 configuration.
    
                 "OnInterfacesChange" from "Network" is announced
                 globally.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    ebb81c2 View commit details
    Browse the repository at this point in the history
  11. [CNetworkLinux] Let's provide Network stack monitoring via NETLINK

                    interface. Currently reported events are changes in link
                    status and interface is being added or removed.
                    On event we requery interfaces list and IF
                    informations. Announcement from "Network" is sent
                    with event data "OnNetworkChange".
    mk01 committed Jan 8, 2017
    Copy the full SHA
    48c3669 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    24af43a View commit details
    Browse the repository at this point in the history
  13. [CCURL] Add IPv6 destinations to Internet reachability test.

            Those will be used only in case host has IPv6 only configuration.
            Without this change, pure IPv6 connectivity would be checked
            with trying to access IPv4 resolved addresses.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    33fbcef View commit details
    Browse the repository at this point in the history
  14. [URIUtils] Provide new IPv6/IPv4 compatible test and manipulation

               methods of CNetwork via those wrappers:
               - on many places through whole Kodi code there is use
               of IPv6 incompatible API calls like
                  inet_ntoa(), inet_aton(), inet_addr()
    
               (Not only are those known not to work for IPv6 queries,
               in some cases it's behaviour is undefined and it's use
               is discouraged.
    
               TODO: all such calls should be eventually changed
               to use this new API and direct use of system level
               network calls should not be allowed anymore)
    mk01 committed Jan 8, 2017
    Copy the full SHA
    f6d24f4 View commit details
    Browse the repository at this point in the history
  15. [NetworkLinux] Update internals according to commit previous commit

               03081378a259f1c32f3411c474b6ec2aabfec29e
    mk01 committed Jan 8, 2017
    Copy the full SHA
    3500370 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    5b5ef9b View commit details
    Browse the repository at this point in the history
  17. [NetworkLinux] Add IPv6 support to GetCurrentDefaultGateway().

                   Neighbor Discovery protocol nor receiving of
                   Router Solicitation messages not implemented.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    e65b6a6 View commit details
    Browse the repository at this point in the history
  18. [CNetworkLinux] Align with CNetwork in regards to IPv6, update to

                    IPv4/v6 compatible calls.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    59240b9 View commit details
    Browse the repository at this point in the history
  19. [CURL] Canonize IPv6 address as part of parsing and store it in this …

    …form.
    
           (update tests in test/TestURL.cpp)
    mk01 committed Jan 8, 2017
    Copy the full SHA
    494d0c2 View commit details
    Browse the repository at this point in the history
  20. Copy the full SHA
    cb63786 View commit details
    Browse the repository at this point in the history
  21. [NetworkLinux] handle NULL derererencing

    mkreisl authored and mk01 committed Jan 8, 2017
    Copy the full SHA
    434e3c3 View commit details
    Browse the repository at this point in the history
  22. [NetworkLinux] - align the behaviour with W32 implementation and load

    only interfaces with flag IFF_UP (interface has (some) configuration
    and is UP - bind() will not fail)
    
    (this means non empty interfaces list is sufficient prerequisite
    to start network services without errors)
    mk01 committed Jan 8, 2017
    Copy the full SHA
    038fa7c View commit details
    Browse the repository at this point in the history
  23. Copy the full SHA
    bbf2685 View commit details
    Browse the repository at this point in the history
  24. [NetWatch] - move the core code into CNetwork, keep only NetLink

    specific handler in LinuxNetwork code.
    
    Prepare for easy w32 watcher integration.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    84192f2 View commit details
    Browse the repository at this point in the history
  25. Copy the full SHA
    d827e74 View commit details
    Browse the repository at this point in the history
  26. [NetworkLinux] - OSX/FreeBSD fixes

    - fix FreeBSD/OSX MacAddr fetch
    - fix NetworkInterfaceLinux::IsConnected()
    mk01 committed Jan 8, 2017
    Copy the full SHA
    68251fa View commit details
    Browse the repository at this point in the history
  27. [CNetwork] - stop and start NetworkUpdater thread with OnSleep/OnWake

        announcements. This avoids unnecessary reconfigurations when IFs
    are changing back to IFF_UP as part of resuming process.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    abbea6d View commit details
    Browse the repository at this point in the history
  28. [CNetwork, WakeOnLan, CDNSNameCache]

    - remove network api calls from wakeonlan, use new CNetwork API
    - move HostToIp() to CDNSNameCache / rename to Lookup(), adapt
      calls accordingly
    - remove Lookup() failure logging from WakeOnLane (as this
      is logged in CDNSNameCache itself)
    mk01 committed Jan 8, 2017
    Copy the full SHA
    1b1edfa View commit details
    Browse the repository at this point in the history
  29. CNetworkLinux::GetNameServers(): also return ipv6 nameservers

    (Upstream commit 254d0d8)
    Rechi authored and mk01 committed Jan 8, 2017
    Copy the full SHA
    f28c402 View commit details
    Browse the repository at this point in the history
  30. Copy the full SHA
    28a589d View commit details
    Browse the repository at this point in the history
  31. [Network] fix/introduce a way to pass size(addr) from unisex struct s…

    …ockaddr_storage down to socks layer
    mk01 committed Jan 8, 2017
    Copy the full SHA
    a959b68 View commit details
    Browse the repository at this point in the history
  32. [CNetworkLinux] remove lock, as all callers to DeleteRemoved() are al…

    …ready creating lock.
    mk01 committed Jan 8, 2017
    Copy the full SHA
    2378735 View commit details
    Browse the repository at this point in the history
  33. Copy the full SHA
    e6a7fec View commit details
    Browse the repository at this point in the history
  34. Copy the full SHA
    94f1f8c View commit details
    Browse the repository at this point in the history
  35. rework CNetworkInterfaceLinux

    Rechi authored and mk01 committed Jan 8, 2017
    Copy the full SHA
    225e6e4 View commit details
    Browse the repository at this point in the history
  36. remove CNetwork::PrefixLengthIPv6(...)

    Rechi authored and mk01 committed Jan 8, 2017
    Copy the full SHA
    f406e6f View commit details
    Browse the repository at this point in the history
  37. Copy the full SHA
    772daec View commit details
    Browse the repository at this point in the history
  38. Copy the full SHA
    3cbded6 View commit details
    Browse the repository at this point in the history
  39. [CDNSNameCache] Update to master

    - remove announcer use from CDNSNameCache
    - flush name cache from Network on services start/restart
    
    (cherry picked from commit 36666d3173633f125f7d3494a8e3c90f365a9d54)
    mk01 committed Jan 8, 2017
    Copy the full SHA
    ad449ea View commit details
    Browse the repository at this point in the history
  40. Copy the full SHA
    913f05e View commit details
    Browse the repository at this point in the history
  41. Copy the full SHA
    c531f6d View commit details
    Browse the repository at this point in the history
  42. Copy the full SHA
    585364e View commit details
    Browse the repository at this point in the history