Skip to content

wan: store wan interface L2 options in device section

Since OpenWrt 21.02, L2 interface options should be stored in interface's device section instead of interface section.

OpenWrt 19.07

config interface 'wan'
    option ifname 'eth0'
    option macaddr '11:22:33:44:55:66'

OpenWrt 21.02

config interface 'wan'
    option device 'eth0'

config device
    option name 'eth0'
    option macaddr '11:22:33:44:55:66'

Please note that:

  • We use named sections for wan device (config device 'dev_wan') for faster lookup
  • Actually only L2 option that we are setting through reforis is maccaddr.

Related to: #229 (closed)

Closes: #242 (closed)

Required for: #105 (closed)

Edited by Martin Matějek

Merge request reports