summaryrefslogtreecommitdiffhomepage
path: root/src/ndp.c
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-28 18:12:21 +0100
committerSteven Barth <steven@midlink.org>2015-03-30 14:14:22 +0200
commit73a7133b6e42edc218da5b8011c580ed48c7731a (patch)
tree71bf65b4c602e14fd8c17ff2ff94db9d394c2b19 /src/ndp.c
parent3b4e6d19b7ce0953efcd6d1c545b031b73e0ab6e (diff)
properly handle return codes
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'src/ndp.c')
-rw-r--r--src/ndp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ndp.c b/src/ndp.c
index 45bb9db..5e8b5ac 100644
--- a/src/ndp.c
+++ b/src/ndp.c
@@ -132,7 +132,7 @@ int setup_ndp_interface(struct interface *iface, bool enable)
iface->ndp_event.uloop.fd = -1;
if (!enable || iface->ndp != RELAYD_RELAY)
- write(procfd, "0\n", 2);
+ if (write(procfd, "0\n", 2) < 0) {}
dump_neigh = true;
}
@@ -152,7 +152,7 @@ int setup_ndp_interface(struct interface *iface, bool enable)
}
if (enable && iface->ndp == RELAYD_RELAY) {
- write(procfd, "1\n", 2);
+ if (write(procfd, "1\n", 2) < 0) {}
close(procfd);
int sock = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_IPV6));