diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-06-14 17:06:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-06-14 17:06:45 +0000 |
commit | 9bd6c0718d0412569b861658965b1ffd3896d9e3 (patch) | |
tree | 878d47a54ef288a361dfaf379462614a2d6825b4 | |
parent | 2c6d09fec7113763f041a0e07fb700cec28bf109 (diff) |
Use inet_net_pton() instead of inet_pton() so that it is possible to use
10/8 as prefix. OK henning@
-rw-r--r-- | usr.sbin/bgpctl/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index ac7cddf90d2..2546268683b 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.31 2006/05/26 05:07:15 henning Exp $ */ +/* $OpenBSD: parser.c,v 1.32 2006/06/14 17:06:44 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -515,7 +515,7 @@ parse_addr(const char *word, struct bgpd_addr *addr) bzero(addr, sizeof(struct bgpd_addr)); bzero(&ina, sizeof(ina)); - if (inet_pton(AF_INET, word, &ina) == 1) { + if (inet_net_pton(AF_INET, word, &ina, sizeof(ina)) != -1) { addr->af = AF_INET; addr->v4 = ina; return (1); |