diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-11-14 14:03:37 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2018-11-14 14:03:37 +0000 |
commit | 8d12494914dddbd7e8634e477148688683975a2b (patch) | |
tree | 4ada1785d27a840abf2e4970ac8b0ec0c0980ca3 /usr.sbin | |
parent | ac799deb162f9a4c270dac6ce3f8a9ca6b741b03 (diff) |
Remove an unneeded union wrapping the skipsteps pointer.
OK phessler@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/bgpd.h | 9 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde_filter.c | 10 |
2 files changed, 7 insertions, 12 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h index d501ca081c1..1792de03f7b 100644 --- a/usr.sbin/bgpd/bgpd.h +++ b/usr.sbin/bgpd/bgpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpd.h,v 1.353 2018/11/10 11:19:01 denis Exp $ */ +/* $OpenBSD: bgpd.h,v 1.354 2018/11/14 14:03:36 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -936,11 +936,6 @@ struct filter_match { struct filter_ovs ovs; }; -union filter_rule_ptr { - struct filter_rule *ptr; - u_int32_t nr; -}; - struct filter_rule { TAILQ_ENTRY(filter_rule) entry; char rib[PEER_DESCR_LEN]; @@ -952,7 +947,7 @@ struct filter_rule { #define RDE_FILTER_SKIP_REMOTE_AS 2 #define RDE_FILTER_SKIP_PEERID 3 #define RDE_FILTER_SKIP_COUNT 4 - union filter_rule_ptr skip[RDE_FILTER_SKIP_COUNT]; + struct filter_rule *skip[RDE_FILTER_SKIP_COUNT]; enum filter_actions action; enum directions dir; u_int8_t quick; diff --git a/usr.sbin/bgpd/rde_filter.c b/usr.sbin/bgpd/rde_filter.c index 3f2b9e85605..79d2bd1728c 100644 --- a/usr.sbin/bgpd/rde_filter.c +++ b/usr.sbin/bgpd/rde_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_filter.c,v 1.112 2018/09/29 08:11:11 claudio Exp $ */ +/* $OpenBSD: rde_filter.c,v 1.113 2018/11/14 14:03:36 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -994,7 +994,7 @@ filterset_name(enum action_types type) #define RDE_FILTER_SET_SKIP_STEPS(i) \ do { \ while (head[i] != cur) { \ - head[i]->skip[i].ptr = cur; \ + head[i]->skip[i] = cur; \ head[i] = TAILQ_NEXT(head[i], entry); \ } \ } while (0) @@ -1061,15 +1061,15 @@ rde_filter(struct filter_head *rules, struct rde_peer *peer, RDE_FILTER_TEST_ATTRIB( (f->peer.groupid && f->peer.groupid != peer->conf.groupid), - f->skip[RDE_FILTER_SKIP_GROUPID].ptr); + f->skip[RDE_FILTER_SKIP_GROUPID]); RDE_FILTER_TEST_ATTRIB( (f->peer.remote_as && f->peer.remote_as != peer->conf.remote_as), - f->skip[RDE_FILTER_SKIP_REMOTE_AS].ptr); + f->skip[RDE_FILTER_SKIP_REMOTE_AS]); RDE_FILTER_TEST_ATTRIB( (f->peer.peerid && f->peer.peerid != peer->conf.id), - f->skip[RDE_FILTER_SKIP_PEERID].ptr); + f->skip[RDE_FILTER_SKIP_PEERID]); if (rde_filter_match(f, peer, state, p)) { if (state != NULL) { |