Bugs item #3606762, was opened at 2013-03-04 06:14
Message generated for change (Comment added) made by leto293
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=611248&aid=3606762&group_id=95403
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: Michael (leto293)
Assigned to: Nobody/Anonymous (nobody)
Summary: vde_pcapplug exits when laptop comes out of sleep
Initial Comment:
Every time my laptop comes out of sleep vde_pcapplug exits. I've added some
debug to the source and found that it's because the ethernet device is
temporarily unavailable just as vde_pcapplug tries to write a packet. I suspect
that the source of the packet is somewhat irrelevent, as there are so many
possible sources, and it is reasonable for any software to send a packet on
resume. Probably the dhcp server I am running.
I wonder if the ethernet unnavailable status should be considered to be a
temporary situation, rather than an exit condition. Trouble is that libpcap
doesn't provide a mechanism to distinguish if from other error conditions.
Your thoughts would be appreciated. I am able to make changes and experiment
here.
Here is my modified main loop:
for(;;) {
poll(pollv,3,-1);
if ((pollv[0].revents | pollv[1].revents | pollv[2].revents) &
POLLHUP ||
pollv[2].revents & POLLIN) {
printlog(LOG_ERR, "exit reason 1\n");
break;
}
if (pollv[0].revents & POLLIN) {
nx = pcap_dispatch(pcap, 1, &pcap_callback, NULL);
if (nx<=0) {
printlog(LOG_ERR, "exit reason 2\n");
break;
}
}
if (pollv[1].revents & POLLIN) {
nx=vde_recv(conn,bufin,sizeof(bufin),0);
if (nx<=0) {
printlog(LOG_ERR, "exit reason 3\n");
break;
}
nx = pcap_inject(pcap, bufin, nx);
if (nx<=0) {
char* err = pcap_geterr(pcap);
printlog(LOG_ERR, "exit reason %d \"%s\"\n",
nx, err);
break;
}
}
}
return(0);
The output is:
pcapplug: exit reason -1 "send: Network is down"
----------------------------------------------------------------------
>Comment By: Michael (leto293)
Date: 2013-03-04 13:07
Message:
Replaced by 3606805.
----------------------------------------------------------------------
Comment By: Michael (leto293)
Date: 2013-03-04 12:57
Message:
I have a fix that works for me, but I am stumped as to how I can attach it
to this issue.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=611248&aid=3606762&group_id=95403
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users