diff options
| author | Karen Schoener <karen@voltanet.io> | 2021-03-15 13:44:12 -0400 | 
|---|---|---|
| committer | Karen Schoener <karen@voltanet.io> | 2021-03-16 10:23:34 -0400 | 
| commit | d4d6e7d87e6630944cbd5a53620ad4658c8dbf7a (patch) | |
| tree | b400f0f6d05659a57b493b4314f3c634d3cdd70e /ldpd/packet.c | |
| parent | 81ef5048dd229570f27c524d6d6268caecf3b663 (diff) | |
ldpd: Add support for the read-only snmp mib objects that are statistics
Add support for the read-only snmp mib objects as described in RFC 3815
that are statistics.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ldpd/packet.c')
| -rw-r--r-- | ldpd/packet.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/ldpd/packet.c b/ldpd/packet.c index fdcaa79d23..8735faf3dd 100644 --- a/ldpd/packet.c +++ b/ldpd/packet.c @@ -560,9 +560,11 @@ session_read(struct thread *thread)  			default:  				log_debug("%s: unknown LDP message from nbr %pI4",  				    __func__, &nbr->id); -				if (!(ntohs(msg->type) & UNKNOWN_FLAG)) +				if (!(ntohs(msg->type) & UNKNOWN_FLAG)) { +					nbr->stats.unknown_msg++;  					send_notification(nbr->tcp,  					    S_UNKNOWN_MSG, msg->id, msg->type); +				}  				/* ignore the message */  				ret = 0;  				break; @@ -667,6 +669,12 @@ session_shutdown(struct nbr *nbr, uint32_t status, uint32_t msg_id,  	case NBR_STA_INITIAL:  	case NBR_STA_OPENREC:  	case NBR_STA_OPENSENT: +		/* update SNMP session counters during initialization */ +		leconf->stats.session_attempts++; +		send_notification(nbr->tcp, status, msg_id, msg_type); + +		nbr_fsm(nbr, NBR_EVT_CLOSE_SESSION); +		break;  	case NBR_STA_OPER:  		send_notification(nbr->tcp, status, msg_id, msg_type);  | 
