pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-sccp/+/34088 )


Change subject: ss7: Log addr and event state for SCTP_PEER_ADDR_CHANGE
......................................................................

ss7: Log addr and event state for SCTP_PEER_ADDR_CHANGE

Change-Id: I989f0180dab25cd6fb1a0c0a49c04a03be118ba3
---
M src/osmo_ss7.c
1 file changed, 20 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/88/34088/1

diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index bc483a6..22139b9 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1729,6 +1729,17 @@
                LOGPASP(asp, DLSS7, log_level, "%s SCTP_ASSOC_CHANGE: %s\n",
                        pfx, 
osmo_sctp_assoc_chg_str(notif->sn_assoc_change.sac_state));
                break;
+       case SCTP_PEER_ADDR_CHANGE:
+               {
+               char addr_str[INET6_ADDRSTRLEN + 10];
+               struct sockaddr_storage sa = notif->sn_paddr_change.spc_aaddr;
+               osmo_sockaddr_to_str_buf(addr_str, sizeof(addr_str), (const 
struct osmo_sockaddr *)&sa);
+               LOGPASP(asp, DLSS7, log_level, "%s SCTP_PEER_ADDR_CHANGE: %s %s 
err=%s\n",
+                       pfx, 
osmo_sctp_paddr_chg_str(notif->sn_paddr_change.spc_state), addr_str,
+                       (notif->sn_paddr_change.spc_state == 
SCTP_ADDR_UNREACHABLE) ?
+                       
osmo_sctp_sn_error_str(notif->sn_paddr_change.spc_error) : "None");
+               }
+               break;
        default:
                LOGPASP(asp, DLSS7, log_level, "%s %s\n",
                        pfx, osmo_sctp_sn_type_str(notif->sn_header.sn_type));

--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34088
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I989f0180dab25cd6fb1a0c0a49c04a03be118ba3
Gerrit-Change-Number: 34088
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to