projects
/
project
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a5ebe69
)
ndp: fix proc-setting
author
Steven Barth
<steven@midlink.org>
Fri, 17 Oct 2014 08:04:10 +0000
(10:04 +0200)
committer
Steven Barth
<steven@midlink.org>
Fri, 17 Oct 2014 08:04:10 +0000
(10:04 +0200)
src/ndp.c
patch
|
blob
|
history
diff --git
a/src/ndp.c
b/src/ndp.c
index
fd0134e
..
a3c6916
100644
(file)
--- a/
src/ndp.c
+++ b/
src/ndp.c
@@
-130,7
+130,9
@@
int setup_ndp_interface(struct interface *iface, bool enable)
close(iface->ndp_event.uloop.fd);
iface->ndp_event.uloop.fd = -1;
close(iface->ndp_event.uloop.fd);
iface->ndp_event.uloop.fd = -1;
- write(procfd, "0\n", 2);
+ if (!enable || iface->ndp != RELAYD_RELAY)
+ write(procfd, "0\n", 2);
+
dump_neigh = true;
}
dump_neigh = true;
}
@@
-149,6
+151,7
@@
int setup_ndp_interface(struct interface *iface, bool enable)
if (enable && iface->ndp == RELAYD_RELAY) {
write(procfd, "1\n", 2);
if (enable && iface->ndp == RELAYD_RELAY) {
write(procfd, "1\n", 2);
+ close(procfd);
int sock = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_IPV6));
if (sock < 0) {
int sock = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC, htons(ETH_P_IPV6));
if (sock < 0) {
@@
-191,8
+194,9
@@
int setup_ndp_interface(struct interface *iface, bool enable)
dump_neigh_table(false);
else
dump_neigh = false;
dump_neigh_table(false);
else
dump_neigh = false;
+ } else {
+ close(procfd);
}
}
- close(procfd);
if (dump_neigh)
dump_neigh_table(true);
if (dump_neigh)
dump_neigh_table(true);