[DragonFlyBSD - Bug #3306] Add description support for ifconfig(8)

2022-05-29 Thread bugtracker-admin
Issue #3306 has been updated by tuxillo.


@dillon, I've gone ahead and pushed the modified version from aly to the repo. 
The buffer to set the description is allocated with M_ZERO so I thought it was 
good enough. @aly, thanks I've pushed the patch with your mods.


Bug #3306: Add description support for ifconfig(8)
http://bugs.dragonflybsd.org/issues/3306#change-14295

* Author: tuxillo
* Status: Closed
* Priority: Normal
* Category: Userland
* Target version: 6.4
* Start date: 2021-11-12



Is there a chance the 'ifconfig NIC description XXX' functionality
will sync with the FreeBSD ? This is a fairly popular option.


# ifconfig vlan1 description vm1-vlan
ifconfig: description: bad value


OpenBSD also has a similar capability[1], as NetBSD as well[2]

Thanks!
__

fn1. https://man.openbsd.org/ifconfig.8

fn2. https://man.netbsd.org/ifconfig.8


---Files
01-if-descr.patch (11.7 KB)
01-if-descr.aly.diff (11.8 KB)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account


[DragonFlyBSD - Bug #3306] Add description support for ifconfig(8)

2021-11-15 Thread bugtracker-admin
Issue #3306 has been updated by liweitianux.

File 01-if-descr.aly.diff added

Hi tuxillo.  Thank you for the work.

I've reviewed the patch and tweaked it a bit.  Attached is the new patch, and 
you can diff to see the difference.

The main change is to the description ioctl(SIOCGIFDESCR) and print part.  
According to the manpage and actual implementation, if the supplied buffer is 
too small, then ioctl(SIOCGIFDESCR) returns an error.  It looks to me the code 
in ifconfig.c is having issues.  I fixed it (but not yet tested).

Another minor issue is that I'm not sure returning ENOMSG is a good choice.  
This errno is seldomly used, and I think that case is just normal (no 
description set), so it's fine to just return 0.

Cheers,
Aaron


Bug #3306: Add description support for ifconfig(8)
http://bugs.dragonflybsd.org/issues/3306#change-14193

* Author: tuxillo
* Status: In Progress
* Priority: Normal
* Category: Userland
* Target version: 6.2
* Start date: 2021-11-12



Is there a chance the 'ifconfig NIC description XXX' functionality
will sync with the FreeBSD ? This is a fairly popular option.


# ifconfig vlan1 description vm1-vlan
ifconfig: description: bad value


OpenBSD also has a similar capability[1], as NetBSD as well[2]

Thanks!
__

fn1. https://man.openbsd.org/ifconfig.8

fn2. https://man.netbsd.org/ifconfig.8


---Files
01-if-descr.patch (11.7 KB)
01-if-descr.aly.diff (11.8 KB)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account


[DragonFlyBSD - Bug #3306] Add description support for ifconfig(8)

2021-11-12 Thread bugtracker-admin
Issue #3306 has been updated by dillon.


The ioctl code in the kernel needs to ensure that the buffer is 
zero-terminated, or it needs to zero-terminate the buffer itself, that it 
stores in if_description.  Otherwise the strlen() on the read side will overrun 
the buffer if userland intentionally sets a description that is not 
zero-terminated.

-Matt


Bug #3306: Add description support for ifconfig(8)
http://bugs.dragonflybsd.org/issues/3306#change-14192

* Author: tuxillo
* Status: In Progress
* Priority: Normal
* Category: Userland
* Target version: 6.2
* Start date: 2021-11-12



Is there a chance the 'ifconfig NIC description XXX' functionality
will sync with the FreeBSD ? This is a fairly popular option.


# ifconfig vlan1 description vm1-vlan
ifconfig: description: bad value


OpenBSD also has a similar capability[1], as NetBSD as well[2]

Thanks!
__

fn1. https://man.openbsd.org/ifconfig.8

fn2. https://man.netbsd.org/ifconfig.8


---Files
01-if-descr.patch (11.7 KB)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://bugs.dragonflybsd.org/my/account