Bug 665601 - sysctl calls fail with VLANs (mostly breaking IPv6)
Summary: sysctl calls fail with VLANs (mostly breaking IPv6)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.8
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 667211 668576 1139560
TreeView+ depends on / blocked
 
Reported: 2010-12-25 11:16 UTC by Pierre Ossman
Modified: 2014-09-09 08:12 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The sysctl utility uses "." as the path delimiter while VLAN interfaces use "." as the ID delimiter. This conflict caused all sysctl calls on a VLAN interface to terminate without any output, causing various issues with IPv6 auto-configuration feature. With this update, several scripts of the iniscripts package have been patched and the sysctl calls no longer hang on VLAN interfaces.
Clone Of:
: 667211 1139560 (view as bug list)
Environment:
Last Closed: 2011-07-21 08:37:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
initscripts-sysctl-vlan.patch (2.94 KB, patch)
2010-12-27 09:02 UTC, Pierre Ossman
no flags Details | Diff
updated patch (4.46 KB, patch)
2011-01-04 20:18 UTC, Bill Nottingham
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1081 0 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2011-07-21 08:33:52 UTC

Description Pierre Ossman 2010-12-25 11:16:19 UTC
I'm amazed this bug has gone unnoticed for so long, but here goes...

sysctl uses "." as the path delimiter. VLAN uses "." as the id delimiter. initscripts does absolutely nothing to resolve this conflict. The end result is that all sysctl calls on VLAN if:s will just fail (silently for extra bonus as the scripts pipe to /dev/null).

With legacy IP this isn't a big deal as the sysctl use is very sparse. For IPv6 however, the shit really hits the fan as you can't even disable address autoconfiguration without sysctl.

Encountered this issue on RHEL 5, but it should still be present in RHEL 6 as I can see that my local F14 machine has the bug.

Attached patch fixes most of the calls. Are still a few left that required a bit more effort to handle.

Please prioritise this bug as it is causing a lot of head ache doing IPv6 rollout with RHEL.

Comment 1 Pierre Ossman 2010-12-27 09:02:02 UTC
Created attachment 470819 [details]
initscripts-sysctl-vlan.patch

Hmm.. patch got lost somewhere...

Comment 2 Bill Nottingham 2011-01-03 16:56:35 UTC
Given that the /proc/sys entries properly contain the '.', and this could happen in other places, I'm inclined to say 'fix /sbin/sysctl'.

Comment 3 Pierre Ossman 2011-01-03 17:11:25 UTC
The problem for /sbin/sysctl is the ambiguity between "." as a delimiter and "." as a part of a component name. Do we really want it guessing? I'd rather stuff fail than pick the wrong entry because of a naming conflict.

Comment 4 Bill Nottingham 2011-01-03 17:20:28 UTC
I just find the idea of a first pass that converts certain '.' to '/' when calling sysctl, just so sysctl can then run a two-pass sed that changes '.' to '/' and '/' to '.'  rather cumbersome.

Seems simpler to just skip sysctl entirely.

Comment 5 Pierre Ossman 2011-01-04 08:42:20 UTC
No objection to that. I don't know the motivation for using sysctl rather than /proc in the first place.

So change the component back to initscripts?

Comment 6 Bill Nottingham 2011-01-04 16:16:24 UTC
Well, I can still change initscripts; but it would be good if /sbin/sysctl was fixed. The upstream man page says:

       variable
              The  name  of  a key to read from.  An example is kernel.ostype.  The '/'
              separator is also accepted in place of a '.'.

... which implies that it *should* work without the substitution.

Comment 7 Pierre Ossman 2011-01-04 16:27:31 UTC
I don't see any way of just "fixing" sysctl. It's the interface that's crap, not the implementation. So any good fixes to sysctl would require changes to initscripts as well.

One variant is to change initscripts to not use "." but rather "/" as the delimiter. That would solve my use case. Not sure if a stray "/" can occur in any component name though...

Comment 8 Bill Nottingham 2011-01-04 19:59:23 UTC
Yeah, I suppose the docs should be updated for sysctl to not imply that it actually works. In any case, can change initscripts in the mean time.

For existing RHEL releases, will probably do the sysctl device substitution as above... would want to investigate in Fedora whether we can get away with direct echos, etc. (For example, in some policy settings, sysctl might be a specific restricted security context that the script isn't.)

Comment 9 Bill Nottingham 2011-01-04 20:18:06 UTC
Created attachment 471742 [details]
updated patch

Comment 10 Bill Nottingham 2011-01-04 21:03:00 UTC
Will also need 4ac5634 from git master.

Comment 12 Harald Hoyer 2011-04-19 14:02:43 UTC
(In reply to comment #10)
> Will also need 4ac5634 from git master.

not really, because we do:
sysctl -a | grep "^net\.ipv6\.conf\." | awk -F. '{ print $4 }' | sort -u | while read interface; do

instead of:
for i in /proc/sys/net/ipv6/conf/* ; do

Comment 15 Tomas Capek 2011-07-13 12:30:16 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The sysctl utility uses "." as the path delimiter while VLAN interfaces use "." as the ID delimiter. This conflict caused all sysctl calls on a VLAN interface to terminate without any output, causing various issues with IPv6 auto-configuration feature. With this update, several scripts of the iniscripts package have been patched and the sysctl calls no longer hang on VLAN interfaces.

Comment 16 errata-xmlrpc 2011-07-21 08:37:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1081.html

Comment 17 errata-xmlrpc 2011-07-21 12:40:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1081.html


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