      fprintf(stderr,
  	    "IPTapAgent(%s): sendpkt attempted with NULL net\n",
  	    name());
-@@ -273,27 +470,172 @@
+@@ -273,27 +470,173 @@
      return(-1);
    }
  

  protected:
 	int command(int argc, const char*const* argv);
--- dist-ns-allinone-2.26/ns-2.26/emulate/iptap.cc	Wed Feb 26 15:08:40 2003
+++ ns-allinone-2.26/ns-2.26/emulate/iptap.cc	Wed Jan  7 01:49:13 2004
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998 The Regents of the University of California.

+						 sizeof(struct ip));
+
+    ip_off = ntohs(ipheader->ip_off);
+    sendlen = ntohs(ipheader->ip_len);
+    if ( (sendlen > mtu) && (ip_off & IP_DF) ) {
+      if (icmpagent) {
+	icmpagent->sendfragneeded(srcnodeipaddr, ipheader->ip_src, mtu, packet );
+      }
+      TDEBUG4("IPTapAgent(%s): Packet size (sz: %d) exceeded MTU: %d\n",
+	      name(), sendlen, mtu);
+      drop(p);
+      return (-1);
+    } 
+
+    if (net_outgoing_->send(p->accessdata(), sendlen) < 0) {
+      fprintf(stderr,
+	      "IPTapAgent(%s): sendpkt (%p, %d): %s\n",
+	      name(), p->accessdata(), sendlen, strerror(errno));
+      drop(p);
+      return (-1);
+    
