diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-06-07 21:10:48 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-06-07 21:10:48 +0000 |
commit | 783a47ed95e5f512479b66804a38bc309a86997d (patch) | |
tree | 9e58ff8a2cd00b6836eab6a13910ac42847de458 /sbin/pfctl | |
parent | 742062c073b6699199cb6d53c78f25f09343d7e9 (diff) |
in print_host(), don't set the mask blindly to /128 but adhere to the
address family. fixes the ipv4/128:port output in pfctl -ss.
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pf_print_state.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index 2fe474e7a4e..59609e0902e 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_print_state.c,v 1.28 2003/05/19 20:22:53 henning Exp $ */ +/* $OpenBSD: pf_print_state.c,v 1.29 2003/06/07 21:10:47 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -138,7 +138,10 @@ print_host(struct pf_state_host *h, sa_family_t af, int opts) memset(&aw, 0, sizeof(aw)); aw.v.a.addr = h->addr; - memset(&aw.v.a.mask, 0xff, sizeof(aw.v.a.mask)); + if (af == AF_INET) + aw.v.a.mask.addr32[0] = 0xffffffff; + else + memset(&aw.v.a.mask, 0xff, sizeof(aw.v.a.mask)); print_addr(&aw, af, opts & PF_OPT_VERBOSE2); } |