diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2009-11-26 13:40:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2009-11-26 13:40:44 +0000 |
commit | b747318d2801c2c3f5fa118893932d89a3ebb3bc (patch) | |
tree | a6a08cab192718c3af547aea362f353672d63d40 /usr.sbin/bgpd/printconf.c | |
parent | 8bca6e9896c0cb906b457e4f4b5ac6a8b8b6a67a (diff) |
support for set origin; based on an initial diff from
Sebastian Benoit <benoit-lists at fb12 dot de> who also tested this version
claudio ok
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-rw-r--r-- | usr.sbin/bgpd/printconf.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c index 346bcfe90ed..d1647aa1a96 100644 --- a/usr.sbin/bgpd/printconf.c +++ b/usr.sbin/bgpd/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.72 2009/10/13 11:41:32 claudio Exp $ */ +/* $OpenBSD: printconf.c,v 1.73 2009/11/26 13:40:43 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -27,6 +27,7 @@ void print_op(enum comp_ops); void print_community(int, int); +void print_origin(u_int8_t); void print_set(struct filter_set_head *); void print_mainconf(struct bgpd_config *); void print_network(struct network_config *); @@ -94,6 +95,19 @@ print_community(int as, int type) } void +print_origin(u_int8_t o) +{ + if (o == ORIGIN_IGP) + printf("igp "); + else if (o == ORIGIN_EGP) + printf("egp "); + else if (o == ORIGIN_INCOMPLETE) + printf("incomplete "); + else + printf("%u ", o); +} + +void print_set(struct filter_set_head *set) { struct filter_set *s; @@ -161,6 +175,10 @@ print_set(struct filter_set_head *set) case ACTION_RTLABEL: printf("rtlabel %s ", s->action.rtlabel); break; + case ACTION_SET_ORIGIN: + printf("origin "); + print_origin(s->action.origin); + break; case ACTION_RTLABEL_ID: case ACTION_PFTABLE_ID: /* not possible */ |