LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-02-2023, 05:16 AM   #1
Mr.Gadgets
LQ Newbie
 
Registered: Oct 2018
Posts: 8

Rep: Reputation: 2
(bug sw15) rc.inet1 / rc.inet1.conf - a couple of vlan issues when using vlan name


I noticed a couple of issues in rc.inet1 while testing vlans.


(issue 1, ip link set shouldn't mention 'type vlan')

rc.inet1.conf allows IFOPTS to set a vlan name

rc.inet1 loops over these options and sets each of them using "/sbin/ip link set dev ${1} type vlan $IFOPT"

this triggers an error "vlan: unknown command "name""

this is reproduced on the commandline by issuing something like "ip link set dev eth0.6 type vlan name xs4all"

the problem is the 'type vlan' part, when omitted, it works as expected

although this is a trivial patch, it looks like there's a bit more needed even -> I then noticed a few other problems



(issue 2, vlan naming clashes with logic checking for ipv4/ipv6 config)

when a vlan is named using IFOPTS, then this name gets used in /proc too
this then becomes problematic when rc.inet1 uses the original nic name to check, like looking at something like

/proc/sys/net/ipv6/conf/eth1.11/autoconf

instead of the 'renamed' location like

/proc/sys/net/ipv6/conf/<vlan name>/autoconf



(issue 3, nic/vlan cleanup logic seems 'off')

upon a restart the script first tries to 'clean up' everything in order to start fresh

I agree with the basis approach of 'first clean everything up so we can start over', but noticed that what gets cleaned up, depends on the current rc.inet1.conf file instead of on the current system state (i.e. available nics/vlans/etc)

this means that processing/checking larger rc.inet1.conf changes by using rc.inet1 (*_)restart can become quite confusing, since for example changes will be not be processed due to old nics still being 'in use'



I'll need to fix this myself at some point, since I like the convenience of using vlan custom naming, but it's not on the top of my priority list atm, so at least I wanted to mention it here, given the sw15/swcur progress
 
Old 01-02-2023, 06:52 AM   #2
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
Quote:
Originally Posted by Mr.Gadgets View Post
I noticed a couple of issues in rc.inet1 while testing vlans.

(issue 1, ip link set shouldn't mention 'type vlan')

rc.inet1.conf allows IFOPTS to set a vlan name
While IFOPT allows you to set any option accepted by the ip command, the entire rc.inet1 does not support changing the name of the interface from what is expected by the script.

VLAN interfaces are assumed to be named <interface>.<vlan ID> - there is no support for using an arbitrary name and using that in place of the expected format as per rc.inet1.conf.

Quote:
Originally Posted by Mr.Gadgets View Post
(issue 2, vlan naming clashes with logic checking for ipv4/ipv6 config)
Again, this comes down to trying to use a specific interface name, rather than accepting the default/assumed interface names, which has always been the way rc.inet1 works.

Quote:
Originally Posted by Mr.Gadgets View Post
(issue 3, nic/vlan cleanup logic seems 'off')

upon a restart the script first tries to 'clean up' everything in order to start fresh

I agree with the basis approach of 'first clean everything up so we can start over', but noticed that what gets cleaned up, depends on the current rc.inet1.conf file instead of on the current system state (i.e. available nics/vlans/etc)

this means that processing/checking larger rc.inet1.conf changes by using rc.inet1 (*_)restart can become quite confusing, since for example changes will be not be processed due to old nics still being 'in use'
This has always been the way rc.inet1 works.

rc.inet1 does not store state information of the current interface configuration in order to know what needs to be deconfigured upon a restart - it only knows about the interfaces as configured in rc.inet1.conf at that point in time.

I admit, this does have it's annoyances when it comes to changing configurations and then restarting the interface; but adding state storage to rc.inet1 just seems overkill for the very very minor problems that the admin may have to correct if they change their interface configurations regularly.

rc.inet1 isn't designed to cater for every config or change - it's there to help set up the interfaces, not manage every aspect of them (which would probably require a much much more complicated system like in Ubuntu et al).

Last edited by tadgy; 01-02-2023 at 06:54 AM.
 
Old 01-02-2023, 07:34 AM   #3
Mr.Gadgets
LQ Newbie
 
Registered: Oct 2018
Posts: 8

Original Poster
Rep: Reputation: 2
@tadgy,

Tnx for the elaborate reply (and for your work, I recognize your handle from the network-scripts README's ).

I understand and agree with the 'design choices' and you're right -> it's fairly easy to 'work around' once aware of what's going on, so time is probably better spent on some other areas.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xfce4-terminal and libvte on SW15 andrewld Slackware 1 04-29-2022 07:40 AM
duplicate/backup init files - i.e. rc.inet1 and rc.inet1.orig krakanut Slackware 3 08-07-2020 02:45 PM
Modifications to rc.inet1, rc.inet1.conf and rc.wireless hba Slackware 1 12-07-2014 03:57 AM
rc.wireless.conf and rc.inet1.conf for wireles cards davimint Slackware 1 07-13-2007 05:44 AM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration