secchan: Fix OFPPS_LINK_DOWN detection.
netdev_get_flags() was supposed to return NETDEV_CARRIER if carrier was
detected by the network device PHY, by checking for the IFF_LOWER_UP bit
in the device flags returned by the SIOCGIFFLAGS ioctl. Unfortunately,
IFF_LOWER_UP has value 0x10000 and that ioctl returns a short int, so this
bit was always read as 0, indicating that carrier was off.
There are at least two other ways to get the carrier status. One is via
rtnetlink with RTM_GETLINK. Unfortunately that is only supported on Linux
2.6.19 and up. So we fall back to the other possibility, which is
/sys/net/class/<device>/carrier. I hope that our users mount sysfs.