Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-3923

Missing extack in case of failure adding or removing an IPv6 address

    • kernel-5.14.0-370.el9
    • sst_networking_core
    • ssg_networking
    • 4
    • 6
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      These functions:

      inet6_addr_add()
      ipv6_add_addr()
      inet6_addr_del()

      don't set the extack in case of failure. In some situations, the extack would be useful for users to understand the problem without having to read kernel code.

      Version-Release number of selected component (if applicable):
      any version (tested on 6.2)

      Actual results:

      1. ip addr add dev enp1s0 fd01::1/60 mngtmpaddr
        RTNETLINK answers: Invalid argument
      1. echo 1 > /proc/sys/net/ipv6/conf/enp7s0/disable_ipv6
      2. ip addr add dev enp7s0 fd01::1
        RTNETLINK answers: Permission denied
      1. ip addr del dev enp1s0 fd01::1234/64
        RTNETLINK answers: Cannot assign requested address

      Expected results:
      Something like:

      1. ip addr add dev enp1s0 fd01::1/60 mngtmpaddr
        Error: ipv6: addresses with mngtmpaddr flag must have prefix length 64
      1. echo 1 > /proc/sys/net/ipv6/conf/enp7s0/disable_ipv6
      2. ip addr add dev enp7s0 fd01::1
        Error: ipv6: IPv6 is disabled on the interface
      1. ip addr del dev enp1s0 fd01::1234/64
        Error: ipv6: address not found

            haliu@redhat.com Hangbin Liu
            bgalvani@redhat.com Beniamino Galvani
            Jianlin Shi Jianlin Shi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: