diff options
author | 2018-09-10 11:09:25 +0000 | |
---|---|---|
committer | 2018-09-10 11:09:25 +0000 | |
commit | 5f086ad573d56b5960e5cc9ee3f221ea6868bded (patch) | |
tree | 8668aa3e8114365bc50379ee052be25370738fd9 | |
parent | do not immediately set the join'd network, the join command only updates (diff) | |
download | wireguard-openbsd-5f086ad573d56b5960e5cc9ee3f221ea6868bded.tar.xz wireguard-openbsd-5f086ad573d56b5960e5cc9ee3f221ea6868bded.zip |
use filterset_move() like all other network statements. It checks for
source == NULL, avoiding a possible crash introduced yesterday.
ok claudio@
-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); |