CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2023/04/26 13:54:35
Modified files: sys/net : if.c pf_ioctl.c route.c route.h Log message: Introduce `rtlabel_mtx' mutex(9) to protect route labels storage. This time kernel and net locks are held in various combination to protect it. We don't want to put kernel lock to all the places. Netlock also can't be used because rtfree(9) which calls rtlabel_unref() has unknown netlock state within. This new `rtlabel_mtx' mutex(9) protects `rt_labels' list and `label' entry dereference. Since we don't export 'rt_label' structure, keep this lock private to net/route.c. For this reason rtlabel_id2name() now copies label string to externally passed buffer instead of returning address of `rt_labels' list data. This is the way which rtlabel_id2sa() already works. ok bluhm@