Bug 2219810 - Missing extack in case of failure adding or removing an IPv6 address
Summary: Missing extack in case of failure adding or removing an IPv6 address
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kernel
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Hangbin Liu
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-05 12:43 UTC by Beniamino Galvani
Modified: 2023-07-27 09:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161573 0 None None None 2023-07-05 12:46:34 UTC

Description Beniamino Galvani 2023-07-05 12:43:38 UTC
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:
# ip addr add dev enp1s0 fd01::1/60 mngtmpaddr
RTNETLINK answers: Invalid argument

# echo 1 > /proc/sys/net/ipv6/conf/enp7s0/disable_ipv6
# ip addr add dev enp7s0 fd01::1
RTNETLINK answers: Permission denied

# ip addr del dev enp1s0 fd01::1234/64
RTNETLINK answers: Cannot assign requested address


Expected results:
Something like:
# ip addr add dev enp1s0 fd01::1/60 mngtmpaddr
Error: ipv6: addresses with mngtmpaddr flag must have prefix length 64

# echo 1 > /proc/sys/net/ipv6/conf/enp7s0/disable_ipv6
# ip addr add dev enp7s0 fd01::1
Error: ipv6: IPv6 is disabled on the interface

# ip addr del dev enp1s0 fd01::1234/64
Error: ipv6: address not found


Note You need to log in before you can comment on or make changes to this bug.