neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/31164 )
Change subject: tunmap: prep new nft rule: log only mapping id ......................................................................
tunmap: prep new nft rule: log only mapping id
Instead of logging a full nft chain/rule name like 'tunmap123', log only the id '123'.
Rationale: with the new nft rulesets, there will be four distinct identifiers: tunmap-pre-123a tunmap-pre-123b tunmap-post-123a tunmap-post-123b so let's simplify.
Related: SYS#6327 SYS#6264 Change-Id: Ic46ae5bd824a211668d4ac9a77b3597eaca17146 --- M src/osmo-upf/up_gtp_action.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/64/31164/1
diff --git a/src/osmo-upf/up_gtp_action.c b/src/osmo-upf/up_gtp_action.c index 238d652..68f5fb9 100644 --- a/src/osmo-upf/up_gtp_action.c +++ b/src/osmo-upf/up_gtp_action.c @@ -125,13 +125,13 @@ if (enable && a->tunmap.id != 0) { LOG_UP_GTP_ACTION(a, LOGL_ERROR, "Cannot enable: nft GTP tunnel mapping rule has been enabled before" - " as " NFT_CHAIN_NAME_PREFIX_TUNMAP "%u\n", a->tunmap.id); + " as nft rule id %u\n", a->tunmap.id); return -EALREADY; } if (!enable && a->tunmap.id == 0) { LOG_UP_GTP_ACTION(a, LOGL_ERROR, "Cannot disable: nft GTP tunnel mapping rule has not been enabled" - " (no " NFT_CHAIN_NAME_PREFIX_TUNMAP " id)\n"); + " (no nft rule id)\n"); return -ENOENT; } if (enable) @@ -140,11 +140,11 @@ rc = upf_nft_tunmap_delete(&a->tunmap); if (rc) { LOG_UP_GTP_ACTION(a, LOGL_ERROR, - "Failed to %s nft GTP tunnel mapping " NFT_CHAIN_NAME_PREFIX_TUNMAP "%u:" + "Failed to %s nft GTP tunnel mapping %u:" " %d %s\n", enable ? "enable" : "disable", a->tunmap.id, rc, strerror(-rc)); return rc; } - LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "%s nft GTP tunnel mapping " NFT_CHAIN_NAME_PREFIX_TUNMAP "%u\n", + LOG_UP_GTP_ACTION(a, LOGL_NOTICE, "%s nft GTP tunnel mapping %u\n", enable ? "Enabled" : "Disabled", a->tunmap.id); if (!enable) a->tunmap.id = 0;