Skip to content

Commit

Permalink
ipfw: add extra test in dummynet_send to avoid kernel panic
Browse files Browse the repository at this point in the history
ether_output_frame() at ether_output_frame+0x4f/frame 0xfffffe003ce54550
dummynet_send() at dummynet_send+0x95/frame 0xfffffe003ce54580
dummynet_io() at dummynet_io+0x357/frame 0xfffffe003ce545c0
ipfw_check_frame() at ipfw_check_frame+0x23e/frame 0xfffffe003ce54770
pfil_run_hooks() at pfil_run_hooks+0x84/frame 0xfffffe003ce54800
  • Loading branch information
AdSchellevis authored and fichtner committed Aug 14, 2015
1 parent f9d2430 commit 96d838e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sys/netpfil/ipfw/ip_dn_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,11 @@ dummynet_send(struct mbuf *m)
break;

case DIR_OUT | PROTO_LAYER2: /* N_TO_ETH_OUT: */
ether_output_frame(ifp, m);
if (ifp) {
ether_output_frame(ifp, m);
} else {
FREE_PKT(m);
}
break;

case DIR_DROP:
Expand Down

0 comments on commit 96d838e

Please sign in to comment.