Change in libosmo-abis[master]: Log peer's port in accept callback
Max has submitted this change and it was merged. ( https://gerrit.osmocom.org/12654 ) Change subject: Log peer's port in accept callback .. Log peer's port in accept callback * log port from which we accept() the connection in addition to address * use macro helper for logging Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 --- M src/input/ipa.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Vadim Yanitskiy: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/input/ipa.c b/src/input/ipa.c index 9853ffa..e41ec42 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -266,8 +266,8 @@ link->addr = talloc_strdup(link, ipbuf); } - LOGP(DLINP, LOGL_NOTICE, "accept()ed new link from %s to port %u\n", - inet_ntoa(sa.sin_addr), link->port); + LOGIPA(link, LOGL_NOTICE, "accept()ed new link from %s:%u\n", + inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); ret = link->accept_cb(link, fd); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/12654 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 Gerrit-Change-Number: 12654 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Harald Welte
Change in libosmo-abis[master]: Log peer's port in accept callback
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12654 ) Change subject: Log peer's port in accept callback .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12654 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 Gerrit-Change-Number: 12654 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-CC: Harald Welte Gerrit-Comment-Date: Tue, 05 Feb 2019 16:02:39 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in libosmo-abis[master]: Log peer's port in accept callback
Max has posted comments on this change. ( https://gerrit.osmocom.org/12654 ) Change subject: Log peer's port in accept callback .. Patch Set 2: I've double-checked and it doesn't seem like we're loosing any information, as Vadim pointed out. Here's how it looks like after this change is applied: input/ipa.c:270 10.9.1.140:4222 accept()ed new link from 10.9.1.140:60480 -- To view, visit https://gerrit.osmocom.org/12654 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 Gerrit-Change-Number: 12654 Gerrit-PatchSet: 2 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-CC: Harald Welte Gerrit-Comment-Date: Fri, 25 Jan 2019 14:32:28 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmo-abis[master]: Log peer's port in accept callback
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12654 ) Change subject: Log peer's port in accept callback .. Patch Set 1: It's great that you want to add useful information. However, removing other useful information (like to which local port) is not good. Thre are many interfaces that use IPA (Abis, SCCPlite, CTRL, GSUP, ...) and the local port number could help to determine which of those the message relates to. Maybe use the full tuple and use osmo_sock_get_name2() instead? -- To view, visit https://gerrit.osmocom.org/12654 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 Gerrit-Change-Number: 12654 Gerrit-PatchSet: 1 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Harald Welte Gerrit-Comment-Date: Thu, 24 Jan 2019 17:20:31 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmo-abis[master]: Log peer's port in accept callback
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12654 Change subject: Log peer's port in accept callback .. Log peer's port in accept callback * log port from which we accept() the connection in addition to address * use macro helper for logging Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 --- M src/input/ipa.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/54/12654/1 diff --git a/src/input/ipa.c b/src/input/ipa.c index 9853ffa..e41ec42 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -266,8 +266,8 @@ link->addr = talloc_strdup(link, ipbuf); } - LOGP(DLINP, LOGL_NOTICE, "accept()ed new link from %s to port %u\n", - inet_ntoa(sa.sin_addr), link->port); + LOGIPA(link, LOGL_NOTICE, "accept()ed new link from %s:%u\n", + inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); ret = link->accept_cb(link, fd); if (ret < 0) { -- To view, visit https://gerrit.osmocom.org/12654 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I186974dae1819af8c92f9ea9eeb966ec7c9c9f55 Gerrit-Change-Number: 12654 Gerrit-PatchSet: 1 Gerrit-Owner: Max