nft: incoming GTP-U: match on local IP, not remote IP

Change-Id: Ib6db148ca350107b2fc7adcaec0fc2930ffcbcde
This commit is contained in:
Neels Janosch Hofmeyr
2022-12-05 16:23:49 +01:00
committed by neels
parent feeaf35e44
commit 341e130841

View File

@@ -129,9 +129,9 @@ static int tunmap_single_direction(char *buf, size_t buflen,
/* Match only UDP packets */
OSMO_STRBUF_PRINTF(sb, " meta l4proto udp");
/* Match on packets coming in from from_peer */
OSMO_STRBUF_PRINTF(sb, " ip saddr ");
OSMO_STRBUF_APPEND(sb, osmo_sockaddr_to_str_buf2, from_peer->addr_remote);
/* Match on packets coming in at specific local IP */
OSMO_STRBUF_PRINTF(sb, " ip daddr ");
OSMO_STRBUF_APPEND(sb, osmo_sockaddr_to_str_buf2, from_peer->addr_local);
/* Match on the TEID in the header */
OSMO_STRBUF_PRINTF(sb, " @ih,32,32 0x%08x", from_peer->teid_local);