public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] alfred: Allow listening interface to appear/disappear
@ 2013-10-01 12:02 Sven Eckelmann
  2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 1/6] alfred: Close netsock when initialization failed Sven Eckelmann
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Sven Eckelmann @ 2013-10-01 12:02 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi,

a device running alfred maybe has to remove the underlying device (e.g. wlan
device has to be reconfigured). This currently makes it necessary to restart
alfred to get the device sending data again. An unwanted side effect of this
procedure is the removal of all data currently stored in alfred.

Instead alfred should detect such problems and try to recover by reopening the
device after sleeping a while. The sleeping is automatically done by select.

I've tested the changes only using macvtap:

Terminal 1:

$ ip link del dev macvlan0
$ ip link add link eth0 name macvlan0 type macvlan
$ ip link set macvlan0 address 1a:46:0b:ca:bc:7b up
$ ./alfred -b none -i macvlan0

Terminal 2 (after letting alfred run for a while)

$ ip link del dev macvlan0
$ ip link add link eth0 name macvlan0 type macvlan
$ ip link set macvlan0 address 1a:46:0b:ca:bc:7b up

Kind regards,
	Sven

 alfred.h  |  4 ++--
 netsock.c | 16 ++++++++--------
 recv.c    |  3 +++
 send.c    | 27 +++++++++++++++++++++------
 server.c  | 36 +++++++++++++++++++++++++++---------
 5 files changed, 61 insertions(+), 25 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-10-03 14:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 12:02 [B.A.T.M.A.N.] alfred: Allow listening interface to appear/disappear Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 1/6] alfred: Close netsock when initialization failed Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 2/6] alfred: Don't access netsock when it is invalid Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 3/6] alfred: Try to detect error on socket Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 4/6] alfred: Handle failed announcement as netsock error Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 5/6] alfred: Try to reinitialize invalid netsock Sven Eckelmann
2013-10-01 12:02 ` [B.A.T.M.A.N.] [PATCH 6/6] alfred: Remove unused check for device MTU Sven Eckelmann
2013-10-03 14:18 ` [B.A.T.M.A.N.] alfred: Allow listening interface to appear/disappear Simon Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox