-#ifdef notdef
- /*
- * Want to generate a message, but lower
- * layers assume they can free up a message
- * in the event of an error. This causes
- * the call to icmp_error to work on ``freed''
- * mbuf's, and worse.
- */
- type = ICMP_UNREACH, code = 0; /* need ``undefined'' */
- if (error == ENETUNREACH || error == ENETDOWN)
+ }
+ ip = mtod(mcopy, struct ip *);
+ type = ICMP_UNREACH, code = 0; /* need ``undefined'' */
+ switch (error) {
+
+ case ENETUNREACH:
+ case ENETDOWN: