Skip to content

Commit

Permalink
Fix #175: mrdisc_deregister() fails for never started vif
Browse files Browse the repository at this point in the history
When first starting up SMCRoute with multiple interfaces, where at least
one phyint does *not* have mrdisc enabled, smcrouted fails with "parse
error" because mrdisc_deregister() fails to deregister a never before
registered mridsc interface.

This patch drops the bogus error, and adds a TODO entry for refactoring
the mrdisc support -- not just for this problem, but preparing for IPv6
and multi-platform support.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Nov 16, 2021
1 parent e22f63d commit 68b0cab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 10 additions & 0 deletions doc/TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

Refactor MRDISC Support
-----------------------

The current MRDISC implementation is fragile (see issue #175 for an
example), and it also does not work on non-Linux systems. So the
implementation really needs to be refactored, not just for this but also
for adding IPv6 support (below).


Add Support for IPv6 MRDISC
---------------------------

Expand Down
3 changes: 1 addition & 2 deletions src/mrdisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,7 @@ int mrdisc_deregister(short vif)
return 0;
}

errno = ENOENT;
return -1;
return 0;
}

void mrdisc_send(void *arg)
Expand Down

0 comments on commit 68b0cab

Please sign in to comment.