diff options
author | paul <paul> | 2003-06-19 01:21:07 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-19 01:21:07 +0000 |
commit | dd488a78add05f10f58f4096dca622c6b5f1f0c9 (patch) | |
tree | 22c986ccc07a5378e5b99fcdf32cc953c841b8d8 /bgpd/bgp_snmp.c | |
parent | 3db0a77852cc0de1385f7046355321229a567924 (diff) |
2003-06-19 Paul Jakma <paul@dishone.st>
* Fix lib/smux.c's reliance on daemons exporting struct
thread_master *master.
Diffstat (limited to 'bgpd/bgp_snmp.c')
-rw-r--r-- | bgpd/bgp_snmp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index 598fc3cd..6e9beab4 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -242,6 +242,7 @@ struct variable bgp_variables[] = {BGP4PATHATTRUNKNOWN, OCTET_STRING, RONLY, bgp4PathAttrTable, 3, {6, 1, 14}}, }; + static u_char * bgpVersion (struct variable *v, oid name[], size_t *length, int exact, @@ -874,7 +875,12 @@ bgpTrapBackwardTransition (struct peer *peer) void bgp_snmp_init () { - smux_init (bgpd_oid, sizeof bgpd_oid / sizeof (oid)); + struct bgp_master *bm; + + if ( !(bm = bgp_get_master ()) ) + return; + + smux_init (bm->master, bgpd_oid, sizeof bgpd_oid / sizeof (oid)); REGISTER_MIB("mibII/bgp", bgp_variables, variable, bgp_oid); smux_start (); } |