| Summary: | sysctl return 0 even fail to set value | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jianlin Shi <jishi> |
| Component: | procps-ng | Assignee: | Jan Rybar <jrybar> |
| Status: | CLOSED DUPLICATE | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.3 | CC: | jishi, kdudka |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-11-29 14:28:05 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: | |
|
Description
Jianlin Shi
2016-11-15 03:21:02 UTC
(In reply to Jianlin Shi from comment #0) > Steps to Reproduce: > 1. sysctl -w net.ipv4.ip_default_ttl=0 > 2. check return value > > Actual results: > return value is 0 This looks incorrect indeed. The exit code should be non-zero if sysctl failed to write the value. > Expected results: > return value should be 255 Why do you think that exactly 255 should be returned? (In reply to Kamil Dudka from comment #1) > (In reply to Jianlin Shi from comment #0) > > Steps to Reproduce: > > 1. sysctl -w net.ipv4.ip_default_ttl=0 > > 2. check return value > > > > Actual results: > > return value is 0 > > This looks incorrect indeed. The exit code should be non-zero if sysctl > failed to write the value. > > > Expected results: > > return value should be 255 > > Why do you think that exactly 255 should be returned? program normally return 255 if the error is "Invalid argument". BTW, sysctl return 255 on rhel6. Issue reproduced and will be investigated. Thank you for your report. Looks like duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1264080 Closing as DUPLICATE *** This bug has been marked as a duplicate of bug 1264080 *** |