Mike Larkin <[email protected]> writes:

> On Mon, Sep 28, 2026 at 11:30:20AM +0300, Atanas Vladimirov wrote:
>> Hello misc,
>>
>> I have the following `veb1` interface:
>>
>> ```
>> $ cat /etc/hostname.veb1
>> description "LAN switch"
>> add em1
>> add vport4
>> add vport6
>> up
>> ```
>>
>> and the vm.conf:
>> ```
>> $ cat /etc/vm.conf
>> switch "uplink" {
>>         interface veb1
>> }
>>
>> vm "docker" {
>>         enable
>>
>>         memory 4G
>>         disk "/raid1/VMs/docker.qcow2"
>>
>>         interface {
>>                 switch "uplink"
>>                 locked lladdr fe:e1:ba:d2:02:32
>>         }
>> }
>> ```
>>
>> and when I start the "docker" vm I have:
>> ```
>> $ ifconfig veb1
>> veb1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>
>>         description: switch1-uplink
>> ```
>>
>> i.e. the `veb1` description has been changed from "LAN switch" to
>> "switch1-uplink".
>>
>> So, I wonder if this is intentional?
>>
>> In usr.sbin/vmd/priv.c - vm_priv_brconfig() has this:
>>
>> ```
>> /* Description can be truncated */
>> (void)snprintf(vfr.vfr_value, sizeof(vfr.vfr_value),
>>     "switch%u-%s", vsw->sw_id, vsw->sw_name);
>>
>> ```
>>
>
> it's in the code so yes I'd say it's intentional.

Intentional, yes. But I think it's worth a thought about if we should be
over-writing a description on an interface. I'm not a user of
descriptions but if someone wants to share a diff to discuss I'm willing
to review.

Reply via email to