Signed-off-by: Nathan Hintz <nlhi...@hotmail.com> --- src/6relayd.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/6relayd.c b/src/6relayd.c index fcfecb7..32ead14 100644 --- a/src/6relayd.c +++ b/src/6relayd.c @@ -403,6 +403,9 @@ int relayd_get_interface_mtu(const char *ifname) snprintf(buf, sizeof(buf), sysctl_pattern, ifname); int fd = open(buf, O_RDONLY); + if (fd < 0) + return -1; + ssize_t len = read(fd, buf, sizeof(buf) - 1); close(fd); -- 1.8.3.1 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel