Fix build for net-snmp
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c
index bf9c7f8..822036c 100644
--- a/bgpd/bgp_snmp.c
+++ b/bgpd/bgp_snmp.c
@@ -21,6 +21,9 @@
 #include <zebra.h>
 
 #ifdef HAVE_SNMP
+#ifdef HAVE_NETSNMP
+#include <net-snmp/net-snmp-config.h>
+#endif
 #include <asn1.h>
 #include <snmp.h>
 #include <snmp_impl.h>
@@ -516,7 +519,7 @@
     case BGPPEEROUTTOTALMESSAGES:
       return SNMP_INTEGER (peer->open_out + peer->update_out
 			   + peer->keepalive_out + peer->notify_out
-			   + peer->refresh_out, peer->dynamic_cap_out);
+			   + peer->refresh_out + peer->dynamic_cap_out);
       break;
     case BGPPEERLASTERROR:
       {