Page MenuHomeVyOS Platform

Some custom sysctl parameters can't be applied bug
Open, Requires assessmentPublicBUG

Description

Some sysctl custom parameters can't be applied in one commit.
For example, if the tunnel interface does not exist yet.
1.3:

set interfaces ethernet eth1 address '203.0.113.1/24'

set interfaces tunnel tun0 address '100.64.0.1/30'
set interfaces tunnel tun0 encapsulation gretap
set interfaces tunnel tun0 source-address '203.0.113.1'
set interfaces tunnel tun0 mtu '1500'
set interfaces tunnel tun0 multicast 'enable'
set interfaces tunnel tun0 parameters ip ttl '64'
set interfaces tunnel tun0 remote '203.0.113.2'
set system sysctl custom net.ipv4.conf.tun0.accept_local value '1'

vyos@r5-1.3# commit
[ system sysctl custom net.ipv4.conf.tun0.accept_local value 1 ]
Use of uninitialized value $ovalue in string ne at /opt/vyatta/sbin/vyatta_update_sysctl.pl line 65.
sysctl: cannot stat /proc/sys/net/ipv4/conf/tun0/accept_local: No such file or directory
exec of /sbin/sysctl failed: '/sbin/sysctl -w net.ipv4.conf.tun0.accept_local="1" 2>&1> /dev/null' at /opt/vyatta/sbin/vyatta_update_sysctl.pl line 69.

[[system sysctl custom net.ipv4.conf.tun0.accept_local value]] failed
Commit failed
[edit]
vyos@r5-1.3#

1.4:

set interfaces ethernet eth1 address '203.0.113.1/24'
set interfaces tunnel tun0 address '100.64.0.1/30'
set interfaces tunnel tun0 encapsulation gretap
set interfaces tunnel tun0 source-address '203.0.113.1'
set interfaces tunnel tun0 mtu '1500'
set interfaces tunnel tun0 multicast 'enable'
set interfaces tunnel tun0 parameters ip ttl '64'
set interfaces tunnel tun0 remote '203.0.113.2'
set system sysctl parameter net.ipv4.conf.tun0.accept_local value '1'

vyos@r1-roll# set system sysctl parameter net.ipv4.conf.tun0.accept_local value '1'

  
  
  
  Invalid value
  Value validation failed
  Set failed

[edit]

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.3-beta-202109080342, VyOS 1.4-rolling-202109061053
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Viacheslav changed Version from VyOS 1.3-beta-202109080342 to VyOS 1.3-beta-202109080342, VyOS 1.4-rolling-202109061053.
Viacheslav updated the task description. (Show Details)

That would only work if accept_local will be added as proper CLI node on the tunnel interface, or use set system sysctl parameter net.ipv4.conf.default.accept_local value '1'

see also T3195