RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1634274 - ip-address can add IPv4 with nodad option
Summary: ip-address can add IPv4 with nodad option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: iproute
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: pre-dev-freeze
: 8.2
Assignee: Andrea Claudi
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On: 1679662 1752857
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-29 14:09 UTC by yiche
Modified: 2020-04-28 16:44 UTC (History)
3 users (show)

Fixed In Version: iproute-5.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:43:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1785 0 None None None 2020-04-28 16:44:20 UTC

Description yiche 2018-09-29 14:09:02 UTC
Description of problem:
nodad option should be IPv6 only and shouldn't be added success with a IPv4 address,people may get confused.

Version-Release number of selected component (if applicable):
iproute-4.11.0-14.el7.x86_64
3.10.0-954.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.ip link add dumy0 type dummy
2.ip -4 addr add 192.168.1.1 dev dumy0 nodad
3.ip a

Actual results:
dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 22:87:91:b4:38:d9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/32 scope global nodad dumy0

Expected results:
ip tool should gives error.

Additional info:

Comment 2 Phil Sutter 2018-11-16 15:14:33 UTC
This is not a regression, consistent with upstream and no customer request. Hence moving this ticket to RHEL8.

Comment 4 Andrea Claudi 2019-06-24 15:36:52 UTC
This happens for 'home' and 'mngtmpaddr', too. Will fix all of these in a patch series upstream.

Comment 5 Andrea Claudi 2019-06-24 17:15:50 UTC
Patch posted upstream: https://patchwork.ozlabs.org/project/netdev/list/?series=115819

Comment 6 Andrea Claudi 2019-06-29 10:27:22 UTC
Merged upstream as:

commit 8ae99cc46d7713069ee626a4ce4335aaeca9892f
Author: Andrea Claudi <aclaudi>
Date:   Tue Jun 25 12:29:55 2019 +0200

    ip address: do not set nodad option for IPv4 addresses

commit e4448b6c7de934f26654d4db84119c0423923719
Author: Andrea Claudi <aclaudi>
Date:   Tue Jun 25 12:29:56 2019 +0200

    ip address: do not set home option for IPv4 addresses

commit 68c46872ce4394376c8b5e804be4f5a2bbd43828
Author: Andrea Claudi <aclaudi>
Date:   Tue Jun 25 12:29:57 2019 +0200

    ip address: do not set mngtmpaddr option for IPv4 addresses

Comment 8 Jaroslav Aster 2019-11-12 17:55:07 UTC
Hi Andrea,

I tested this bug and I would like to ask whether or not iproute acts correct from your POV.

# ip link add test type dummy
# ip addr add 172.29.5.1/24 dev test nodad
Warning: nodad option can be set only for IPv6 addresses
# echo $?
0
# ip addr show dev test | grep 172.29.5.1
    inet 172.29.5.1/24 scope global test

iproute returns zero, even if I set option which is not valid for ipv4 and, at the same time, ipv4 address is set on the interface. I would expect non-zero return and not setting ipv4 address on the interface. What do you thing?

Comment 9 Andrea Claudi 2019-11-22 13:34:12 UTC
(In reply to Jaroslav Aster from comment #8)
> Hi Andrea,
> 
> I tested this bug and I would like to ask whether or not iproute acts
> correct from your POV.
> 
> # ip link add test type dummy
> # ip addr add 172.29.5.1/24 dev test nodad
> Warning: nodad option can be set only for IPv6 addresses
> # echo $?
> 0
> # ip addr show dev test | grep 172.29.5.1
>     inet 172.29.5.1/24 scope global test
> 
> iproute returns zero, even if I set option which is not valid for ipv4 and,
> at the same time, ipv4 address is set on the interface. I would expect
> non-zero return and not setting ipv4 address on the interface. What do you
> thing?

This is debatable, but before my commit specifying nodad on an ipv4 address simply ignore it and set the address; now iproute displays a warning message, but set the address as before.
Changing this behaviour can break existing script setup, and I would avoid that if possible.

Comment 13 errata-xmlrpc 2020-04-28 16:43:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1785


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