Hello, on FreeBSD-STABLE at least ipfw wrongly interprets dummynet configurations of the type:
pipe 10 config bw 1.5Mb ^^^ as being 1bit/s configuration. Which is quite wrong in real production usage. This simple patch fixes it http://tinyurl.com/33j6odw. I am not sure if this should be included before 8.1 release or not. Here is the inline version. Index: sbin/ipfw/dummynet.c =================================================================== RCS file: /home/ncvs/src/sbin/ipfw/dummynet.c,v retrieving revision 1.9.2.4 diff -u -r1.9.2.4 dummynet.c --- sbin/ipfw/dummynet.c 23 Mar 2010 09:58:59 -0000 1.9.2.4 +++ sbin/ipfw/dummynet.c 14 Jun 2010 21:49:38 -0000 @@ -528,10 +528,10 @@ if_name[namelen] = '\0'; *bandwidth = 0; } else { /* read bandwidth value */ - int bw; + double bw; char *end = NULL; - bw = strtoul(arg, &end, 0); + bw = strtod(arg, &end); if (*end == 'K' || *end == 'k') { end++; bw *= 1000; @@ -547,7 +547,7 @@ if (bw < 0) errx(EX_DATAERR, "bandwidth too large"); - *bandwidth = bw; + *bandwidth = (int)bw; if (if_name) if_name[0] = '\0'; } Regards, -- Ermal _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"