summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2022-06-21 10:05:49 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2022-06-21 10:05:49 +0000
commit2729f665e7787e899b827f07688d11d16d506e4b (patch)
tree8dc81e566b25ca48274c591023fceaa13b0c6578 /usr.sbin
parentde15e28a04f51c3150b749406134c12fb1bbe97f (diff)
Use applymask() instead of inetXapplymask() since this code operates on
struct bgpd_addr. OK tb@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpctl/parser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c
index e943f09fe68..17cfe1ab267 100644
--- a/usr.sbin/bgpctl/parser.c
+++ b/usr.sbin/bgpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.111 2022/06/16 15:34:07 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.112 2022/06/21 10:05:48 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -968,17 +968,16 @@ parse_prefix(const char *word, size_t wordlen, struct bgpd_addr *addr,
mask = 32;
if (mask > 32)
errx(1, "invalid netmask: too large");
- inet4applymask(&addr->v4, &addr->v4, mask);
break;
case AID_INET6:
if (mask == -1)
mask = 128;
- inet6applymask(&addr->v6, &addr->v6, mask);
break;
default:
return (0);
}
+ applymask(&addr, &addr, mask);
*prefixlen = mask;
return (1);
}