+ /*
+ * The flags we pass in are 32-bit and unsigned.
+ *
+ * On most if not all UN*Xes, ifr_flags is 16-bit and
+ * signed, and the result of assigning a longer
+ * unsigned value to a shorter signed value is
+ * implementation-defined (even if, in practice, it'll
+ * do what's intended on all platforms we support
+ * result of assigning a 32-bit unsigned value).
+ * So we mask out the upper 16 bits.
+ */
+ ifr.ifr_flags = *if_flags & 0xffff;