--- src/sys/netpfil/ipfw/ip_dummynet.c.orig 2014-05-02 01:36:59.000000000 -0400 +++ src/sys/netpfil/ipfw/ip_dummynet.c 2014-05-02 01:35:58.000000000 -0400 @@ -1210,15 +1210,18 @@ * configure a link (and its FIFO instance) */ static int -config_link(struct dn_link *p, struct dn_id *arg) +config_link(struct dn_link *op, struct dn_id *arg) { + struct dn_link np; int i; - if (p->oid.len != sizeof(*p)) { - D("invalid pipe len %d", p->oid.len); + bcopy(&(op->oid.len), &(np.oid.len), sizeof(np.oid.len)); + if (np.oid.len != sizeof(np)) { + D("invalid pipe len %d", np.oid.len); return EINVAL; } - i = p->link_nr; + bcopy(op, &np, sizeof(np)); + i = np.link_nr; if (i <= 0 || i >= DN_MAX_ID) return EINVAL; /* @@ -1228,9 +1231,9 @@ * qsize = slots/bytes * burst ??? */ - p->delay = (p->delay * hz) / 1000; + np.delay = (np.delay * hz) / 1000; /* Scale burst size: bytes -> bits * hz */ - p->burst *= 8 * hz; + np.burst *= 8 * hz; DN_BH_WLOCK(); /* do it twice, base link and FIFO link */ @@ -1247,15 +1250,15 @@ s->profile = NULL; } /* copy all parameters */ - s->link.oid = p->oid; + s->link.oid = np.oid; s->link.link_nr = i; - s->link.delay = p->delay; - if (s->link.bandwidth != p->bandwidth) { + s->link.delay = np.delay; + if (s->link.bandwidth != np.bandwidth) { /* XXX bandwidth changes, need to update red params */ - s->link.bandwidth = p->bandwidth; + s->link.bandwidth = np.bandwidth; update_red(s); } - s->link.burst = p->burst; + s->link.burst = np.burst; schk_reset_credit(s); } dn_cfg.id++;