From 2729f665e7787e899b827f07688d11d16d506e4b Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 21 Jun 2022 10:05:49 +0000 Subject: Use applymask() instead of inetXapplymask() since this code operates on struct bgpd_addr. OK tb@ --- usr.sbin/bgpctl/parser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'usr.sbin') 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 @@ -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); } -- cgit v1.2.3