I recently sent a diff for enabling slaacctl(8) to show the advertised MTU [0]. florian@ commented that it is confusing that slaacctl is showing a different MTU than ifconfig, and noted that setting MTU is "perfectly simple to do it in slaacd".
This is the first in a series of 4 patches, which enables: 1.) slaacd(8) to set MTU on an interface, and 2.) slaacctl(8) to show the set MTU slaacd has been pledged, and setting mtu on the interface requires additional bits in pledge. [0] https://marc.info/?l=openbsd-tech&m=153223732924245&w=2 diff --git sys/kern/kern_pledge.c sys/kern/kern_pledge.c index d2d1b0a9cbb..2e221660000 100644 --- sys/kern/kern_pledge.c +++ sys/kern/kern_pledge.c @@ -1256,6 +1256,10 @@ pledge_ioctl(struct proc *p, long com, struct file *fp) if (fp->f_type == DTYPE_SOCKET) return (0); break; + case SIOCSIFMTU: + if (fp->f_type == DTYPE_SOCKET) + return (0); + break; } }
