Skip to content

Commit 6db48be

Browse files
idanfreibergrfuchs
authored andcommitted
MT#55283 kernel-module: scrub forwarded skb metadata
Closes #2140 Change-Id: I89c8a75d79c1c16ece6ca98ae2bbd5f615cc3ca2 (cherry picked from commit 7051631) (cherry picked from commit cc08c0f)
1 parent d3e4236 commit 6db48be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

kernel-module/nft_rtpengine.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5176,6 +5176,11 @@ static int send_proxy_packet(struct sk_buff *skb, const struct re_address *src,
51765176
goto drop;
51775177
}
51785178

5179+
/* This skb was received from the network but is now being reinjected as
5180+
* a new locally generated packet. Drop inherited routing, conntrack, and
5181+
* netfilter metadata before handing it to the IP output path. */
5182+
skb_scrub_packet(skb, true);
5183+
51795184
switch (src->family) {
51805185
case AF_INET:
51815186
return send_proxy_packet4(skb, src, dst, tos, net);

0 commit comments

Comments
 (0)