diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2018-09-10 11:09:26 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2018-09-10 11:09:26 +0000 |
commit | 36c287b6f658f6705cb76e28780452c0d6c5b57c (patch) | |
tree | 98ed543561887f7b26628b9600da721c73c26594 /usr.sbin | |
parent | 379067a9c3b6e244309124ca516b637eff7a0767 (diff) |
use filterset_move() like all other network statements. It checks for
source == NULL, avoiding a possible crash introduced yesterday.
ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 4d5861f5b54..00c817d034f 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.349 2018/09/09 20:39:09 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.350 2018/09/10 11:09:25 benno Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -830,8 +830,7 @@ network : NETWORK prefix filter_set { if ((n = calloc(1, sizeof(struct network))) == NULL) fatal("new_network"); strlcpy(n->net.psname, ps->name, sizeof(n->net.psname)); - TAILQ_INIT(&n->net.attrset); - TAILQ_CONCAT(&n->net.attrset, $4, entry); + filterset_move($4, &n->net.attrset); n->net.type = NETWORK_PREFIXSET; TAILQ_INSERT_TAIL(netconf, n, entry); free($3); |