[PATCH] osmo-ggsn[master]: ggsn.c: cb_tun_ind: log dst addr of packet without pdp ctx

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Jan 30 21:50:51 UTC 2018


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/6201

to look at the new patch set (#2).

ggsn.c: cb_tun_ind: log dst addr of packet without pdp ctx

Change-Id: Ib3a87ec2b2d0014376295028a648750fa3124485
---
M ggsn/ggsn.c
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/01/6201/2

diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index c7f6376..fed8f73 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -725,6 +725,7 @@
 	struct iphdr *iph = (struct iphdr *)pack;
 	struct ip6_hdr *ip6h = (struct ip6_hdr *)pack;
 	struct ippool_t *pool;
+	char straddr[INET6_ADDRSTRLEN];
 
 	switch (iph->version) {
 	case 4:
@@ -755,7 +756,9 @@
 	DEBUGP(DTUN, "Received packet for APN(%s) from tun %s", apn->cfg.name, tun->devname);
 
 	if (ippool_getip(pool, &ipm, &dst)) {
-		DEBUGPC(DTUN, " with no PDP contex!!\n");
+		DEBUGPC(DTUN, " with no PDP contex! (%s)\n", iph->version == 4 ?
+			inet_ntop(AF_INET, &iph->saddr, straddr, sizeof(straddr)) :
+			inet_ntop(AF_INET6, &ip6h->ip6_src, straddr, sizeof(straddr)));
 		return 0;
 	}
 	DEBUGPC(DTUN, "\n");

-- 
To view, visit https://gerrit.osmocom.org/6201
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib3a87ec2b2d0014376295028a648750fa3124485
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list