Bug 1634274
| Summary: | ip-address can add IPv4 with nodad option | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | yiche <yiche> |
| Component: | iproute | Assignee: | Andrea Claudi <aclaudi> |
| Status: | CLOSED ERRATA | QA Contact: | Jaroslav Aster <jaster> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.1 | CC: | aclaudi, atragler, jaster |
| Target Milestone: | pre-dev-freeze | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | iproute-5.3.0-1.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 16:43:54 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1679662, 1752857 | ||
| Bug Blocks: | |||
This is not a regression, consistent with upstream and no customer request. Hence moving this ticket to RHEL8. This happens for 'home' and 'mngtmpaddr', too. Will fix all of these in a patch series upstream. Patch posted upstream: https://patchwork.ozlabs.org/project/netdev/list/?series=115819 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
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?
(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. 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 |
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: