+ /*
+ * Usage of IP_PKTINFO, without local port already
+ * speficified will cause kernel to panic,
+ * see rdar://problem/18508185.
+ * For now returning error to avoid a kernel panic
+ * This routines can be refactored and handle this better
+ * in future.
+ */
+ if (inp->inp_lport == 0)
+ return (EINVAL);