Hello,

The getifaddrs bug is due to the following:

/* Return a list of interfaces as expected by the SIOCGIFCONF ioctl.
   The maximum number of bytes returned can be given in AMOUNT, but if
   AMOUNT is negative, all interfaces will be returned. Always
   succeeds (and interface list will be truncated to fit into AMOUNT
   space) for BSD compatibility.  */
routine pfinet_siocgifconf (
        port: io_t;
        amount: vm_size_t;
        out buf: data_t, dealloc
);

notably this: "if AMOUNT is negative" ; vm_size_t can never be negative
since it's unsigned, and thus the test in pfinet always fails.  Should
we perhaps simply introduce vm_ssize_t, just like ssize_t exists along
size_t?

Samuel

Reply via email to