diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpctl/irr_output.c | 4 | ||||
-rw-r--r-- | usr.sbin/bgpctl/irr_parser.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpctl/irr_output.c b/usr.sbin/bgpctl/irr_output.c index 7d30e29fd42..fe91a85b7fb 100644 --- a/usr.sbin/bgpctl/irr_output.c +++ b/usr.sbin/bgpctl/irr_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irr_output.c,v 1.2 2007/03/03 12:41:13 henning Exp $ */ +/* $OpenBSD: irr_output.c,v 1.3 2007/03/04 12:37:07 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -50,7 +50,7 @@ write_filters(char *outpath) while ((r = TAILQ_FIRST(&router_head)) != NULL) { TAILQ_REMOVE(&router_head, r, entry); - if (r->address != NULL) { + if (r->address != NULL && r->address[0] != '\0') { for (i = 0; i < strlen(r->address); i++) if (!allowed_in_address(r->address[i])) errx(1, "router address \"%s\" contains" diff --git a/usr.sbin/bgpctl/irr_parser.c b/usr.sbin/bgpctl/irr_parser.c index 6a21bced1d5..f9fe2e2f149 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.3 2007/03/04 12:27:46 henning Exp $ */ +/* $OpenBSD: irr_parser.c,v 1.4 2007/03/04 12:37:07 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -211,7 +211,7 @@ parse_policy(char *key, char *val) struct policy_item *pi; enum pdir dir; enum policy_parser_st st = PO_NONE, nextst; - char *tok, *router = NULL, *p; + char *tok, *router = "", *p; if (!strcmp(key, "import")) dir = IMPORT; |