FreeBSD Bugzilla – Attachment 142223 Details for
Bug 189219
[dummynet] [patch] using dummynet on sparc64 and configuring a pipe is an insta-panic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.59 KB, created by
david
on 2014-05-02 06:50:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
david
Created:
2014-05-02 06:50:00 UTC
Size:
1.59 KB
patch
obsolete
>--- 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++;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 189219
: 142223