Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29862

Extracting a subnet from IPv4 with INET6_NTOA & INET6_ATON

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.5.15
    • N/A
    • Data types
    • None
    • CentOS 3.10 x86_64
      cacti 1.2.22 (if needed)

    Description

      I have an issue to extract the subnet part of an IPv4 based on the subnet mask and the ip adress.
      In my DB the ip adress are of type varbinary(16) and the ip is stored using INET6_ATON

      I'm using this Mysql function to test it:

      this one work:
      select INET_NTOA(INET_ATON("255.255.0.0")&INET_ATON("10.65.1.2" ))
      return: 10.65.0.0

      This don't :
      select INET6_NTOA(INET6_ATON("255.255.0.0")&INET6_ATON("10.65.1.2" ))
      return: null

      And I need the record be able to handle either IPv4 and IPv6.
      Is that the problem of 64 vs 128bit whay to handle the & function ?

      Attachments

        Activity

          People

            serg Sergei Golubchik
            arno_st Arno
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.