summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpctl/irr_parser.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-09-08 15:40:25 +0000
committerclaudio <claudio@openbsd.org>2009-09-08 15:40:25 +0000
commit06e47665faa8242919d703ec600631c22bada6e1 (patch)
tree4c02453b3a8ff7a4f72e83dbbd0df83772edc6d9 /usr.sbin/bgpctl/irr_parser.c
parentmissing word; (diff)
downloadwireguard-openbsd-06e47665faa8242919d703ec600631c22bada6e1.tar.xz
wireguard-openbsd-06e47665faa8242919d703ec600631c22bada6e1.zip
Update irrfilter to support IPv6 and 4-byte AS numbers. IPv6 support based
on work by Tonnerre Lombard I just cleaned it up. OK henning, sthen
Diffstat (limited to 'usr.sbin/bgpctl/irr_parser.c')
-rw-r--r--usr.sbin/bgpctl/irr_parser.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/irr_parser.c b/usr.sbin/bgpctl/irr_parser.c
index 063faba1753..33e51e823c5 100644
--- a/usr.sbin/bgpctl/irr_parser.c
+++ b/usr.sbin/bgpctl/irr_parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: irr_parser.c,v 1.8 2007/03/05 22:34:08 henning Exp $ */
+/* $OpenBSD: irr_parser.c,v 1.9 2009/09/08 15:40:25 claudio Exp $ */
/*
* Copyright (c) 2007 Henning Brauer <henning@openbsd.org>
@@ -81,6 +81,7 @@ parse_response(FILE *f, enum qtype qtype)
return (-1);
break;
case QTYPE_ROUTE:
+ case QTYPE_ROUTE6:
if ((n = parse_route(key, val)) == -1)
return (-1);
break;
@@ -281,7 +282,7 @@ parse_policy(char *key, char *val)
!isdigit(tok[2]))
errx(1, "peering spec \"%s\": format "
"error, AS expected", tok);
- pi->peer_as = strtonum(tok + 2, 1, USHRT_MAX,
+ pi->peer_as = strtonum(tok + 2, 1, UINT_MAX,
&errstr);
if (errstr)
errx(1, "peering spec \"%s\": format "
@@ -407,7 +408,8 @@ parse_asset(char *key, char *val)
int
parse_route(char *key, char *val)
{
- if (strcmp(key, "route")) /* ignore everything else */
+ if (strcmp(key, "route") && strcmp(key, "route6"))
+ /* ignore everything else */
return (0);
/* route is single-value, but seen trailing , in the wild */