diff options
author | maxim <maxim@FreeBSD.org> | 2007-08-26 18:38:31 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2007-08-26 18:38:31 +0000 |
commit | 3eb0fa1342d0b24e14ff06361e7b8a71c4441b06 (patch) | |
tree | 2dc24dd997e8158a335df7e434231c8a5e0a35eb /sbin | |
parent | 64c3de9e17e1278b9e185a47e24a4e63d7a9bb5e (diff) | |
download | FreeBSD-src-3eb0fa1342d0b24e14ff06361e7b8a71c4441b06.zip FreeBSD-src-3eb0fa1342d0b24e14ff06361e7b8a71c4441b06.tar.gz |
o Fix bug I introduced in the previous commit (ipfw set extention):
pack a set number correctly.
Submitted by: oleg
o Plug a memory leak.
Submitted by: oleg and Andrey V. Elsukov
Approved by: re (kensmith)
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 298dba2..a83cea0 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -2575,7 +2575,7 @@ list(int ac, char *av[], int show_counters) for (n = 0, d = dynrules; n < ndyn; n++, d++) { if (use_set) { /* skip rules from another set */ - bcopy(&d->rule + sizeof(uint16_t), + bcopy((char *)&d->rule + sizeof(uint16_t), &set, sizeof(uint8_t)); if (set != use_set - 1) continue; @@ -2603,7 +2603,7 @@ list(int ac, char *av[], int show_counters) printf("## Dynamic rules (%d):\n", ndyn); for (n = 0, d = dynrules; n < ndyn; n++, d++) { if (use_set) { - bcopy(&d->rule + sizeof(uint16_t), + bcopy((char *)&d->rule + sizeof(uint16_t), &set, sizeof(uint8_t)); if (set != use_set - 1) continue; @@ -2660,7 +2660,7 @@ list(int ac, char *av[], int show_counters) if (rulenum > rnum) break; if (use_set) { - bcopy(&d->rule + sizeof(uint16_t), + bcopy((char *)&d->rule + sizeof(uint16_t), &set, sizeof(uint8_t)); if (set != use_set - 1) continue; |