CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2017/10/12 03:10:52

Modified files:
        sys/net        : if.c 

Log message:
Fix a singed vs unsigned comparison resulting in an overflow of the
routing socket.

When clang became the default compiler, `if_flags' from `struct ifnet'
was changed from "short" to "unsigned short", to silence a warning.
Sadly the copy of these flags on the stack was still a "short" which
made the flags comparison always true, which in turn made ifioctl()
generates a RTM_INFO message for many ioctl(2).

Since my last commit, the flag comparison is done for every ioctl(2).
This made the kernel generate at least one routing message per ioctl,
resulting in a lot of RTM_DESYNC.

RTM_DESYNC problem reported by krw@ thanks to dhclient(8)'s noisiness!

ok krw@, patrick@

Reply via email to