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: 

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: Open
Resolution: None
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 is my modified main loop:

        for(;;) {
                if ((pollv[0].revents | pollv[1].revents | pollv[2].revents) & 
                                pollv[2].revents & POLLIN) {
                        printlog(LOG_ERR, "exit reason 1\n");
                if (pollv[0].revents & POLLIN) {
                        nx = pcap_dispatch(pcap, 1, &pcap_callback, NULL);
                        if (nx<=0) {
                                printlog(LOG_ERR, "exit reason 2\n");
                if (pollv[1].revents & POLLIN) {
                        if (nx<=0) {
                                printlog(LOG_ERR, "exit reason 3\n");
                        nx = pcap_inject(pcap, bufin, nx);
                        if (nx<=0) {
                                char* err = pcap_geterr(pcap);
                                printlog(LOG_ERR, "exit reason %d \"%s\"\n", 
nx, err);

The output is:
pcapplug: exit reason -1 "send: Network is down"


>Comment By: Michael (leto293)
Date: 2013-03-04 12:57

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: 

Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
vde-users mailing list

Reply via email to