View | Details | Raw Unified | Return to bug 1050
Collapse All | Expand All

(-)a/src/tap-bridge/model/tap-bridge.cc (-1 / +3 lines)
 Lines 599-605    Link Here 
599
      // so we call it "control."
599
      // so we call it "control."
600
      //
600
      //
601
      size_t msg_size = sizeof(int);
601
      size_t msg_size = sizeof(int);
602
      char control[CMSG_SPACE(msg_size)];
602
      char* control = new char[CMSG_SPACE (msg_size)];
603
603
604
      //
604
      //
605
      // There is a msghdr that is used to minimize the number of parameters
605
      // There is a msghdr that is used to minimize the number of parameters
 Lines 649-654    Link Here 
649
                  int *rawSocket = (int*)CMSG_DATA (cmsg);
649
                  int *rawSocket = (int*)CMSG_DATA (cmsg);
650
                  NS_LOG_INFO ("Got the socket from the socket creator = " << *rawSocket);
650
                  NS_LOG_INFO ("Got the socket from the socket creator = " << *rawSocket);
651
                  m_sock = *rawSocket;
651
                  m_sock = *rawSocket;
652
                  delete[] control;
652
                  return;
653
                  return;
653
                }
654
                }
654
              else
655
              else
 Lines 657-662    Link Here 
657
                }
658
                }
658
	    }
659
	    }
659
	}
660
	}
661
	    delete[] control;
660
      NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
662
      NS_FATAL_ERROR ("Did not get the raw socket from the socket creator");
661
    }
663
    }
662
}
664
}
(-)a/src/tap-bridge/model/tap-creator.cc (-1 / +2 lines)
 Lines 213-219    Link Here 
213
  // so we call it "control."
213
  // so we call it "control."
214
  //
214
  //
215
  size_t msg_size = sizeof(int);
215
  size_t msg_size = sizeof(int);
216
  char control[CMSG_SPACE(msg_size)];
216
  char* control = new char[CMSG_SPACE (msg_size)];
217
217
218
  //
218
  //
219
  // There is a msghdr that is used to minimize the number of parameters
219
  // There is a msghdr that is used to minimize the number of parameters
 Lines 268-273    Link Here 
268
  // Actually send the file descriptor back to the tap bridge.
268
  // Actually send the file descriptor back to the tap bridge.
269
  //
269
  //
270
  ssize_t len = sendmsg(sock, &msg, 0);
270
  ssize_t len = sendmsg(sock, &msg, 0);
271
  delete[] control;
271
  ABORT_IF (len == -1, "Could not send socket back to tap bridge", 1);
272
  ABORT_IF (len == -1, "Could not send socket back to tap bridge", 1);
272
273
273
  LOG ("sendmsg complete");
274
  LOG ("sendmsg complete");

Return to bug 1050