]> git.ipfire.org Git - thirdparty/grub.git/commit
net/net: Add net_set_vlan command
authorChad Kimes <chkimes@github.com>
Mon, 21 Mar 2022 21:29:16 +0000 (17:29 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 20 Apr 2022 11:52:16 +0000 (13:52 +0200)
commit954c48b9c833d64b74ced1f27701af2ea5c6f55a
tree1cf9dd20f8aa9534ef33de576afed8fcd31d79d3
parent98c299e540ec2942c2734c3e56cf586302d3eef0
net/net: Add net_set_vlan command

Previously there was no way to set the 802.1Q VLAN identifier, despite
support for vlantag in the net module. The only location vlantag was
being populated was from PXE boot and only for Open Firmware hardware.
This commit allows users to manually configure VLAN information for any
interface.

Example usage:
  grub> net_ls_addr
  efinet1 00:11:22:33:44:55 192.0.2.100
  grub> net_set_vlan efinet1 100
  grub> net_ls_addr
  efinet1 00:11:22:33:44:55 192.0.2.100 vlan100
  grub> net_set_vlan efinet1 0
  efinet1 00:11:22:33:44:55 192.0.2.100

Signed-off-by: Chad Kimes <chkimes@github.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/net/net.c