Skip to content

Commit 364df53

Browse files
menglongdongkuba-moo
authored andcommitted
net: socket: rename SKB_DROP_REASON_SOCKET_FILTER
Rename SKB_DROP_REASON_SOCKET_FILTER, which is used as the reason of skb drop out of socket filter before it's part of a released kernel. It will be used for more protocols than just TCP in future series. Signed-off-by: Menglong Dong <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3c42b20 commit 364df53

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/linux/skbuff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ enum skb_drop_reason {
318318
SKB_DROP_REASON_NO_SOCKET,
319319
SKB_DROP_REASON_PKT_TOO_SMALL,
320320
SKB_DROP_REASON_TCP_CSUM,
321-
SKB_DROP_REASON_TCP_FILTER,
321+
SKB_DROP_REASON_SOCKET_FILTER,
322322
SKB_DROP_REASON_UDP_CSUM,
323323
SKB_DROP_REASON_MAX,
324324
};

include/trace/events/skb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
EM(SKB_DROP_REASON_NO_SOCKET, NO_SOCKET) \
1515
EM(SKB_DROP_REASON_PKT_TOO_SMALL, PKT_TOO_SMALL) \
1616
EM(SKB_DROP_REASON_TCP_CSUM, TCP_CSUM) \
17-
EM(SKB_DROP_REASON_TCP_FILTER, TCP_FILTER) \
17+
EM(SKB_DROP_REASON_SOCKET_FILTER, SOCKET_FILTER) \
1818
EM(SKB_DROP_REASON_UDP_CSUM, UDP_CSUM) \
1919
EMe(SKB_DROP_REASON_MAX, MAX)
2020

net/ipv4/tcp_ipv4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ int tcp_v4_rcv(struct sk_buff *skb)
20952095
nf_reset_ct(skb);
20962096

20972097
if (tcp_filter(sk, skb)) {
2098-
drop_reason = SKB_DROP_REASON_TCP_FILTER;
2098+
drop_reason = SKB_DROP_REASON_SOCKET_FILTER;
20992099
goto discard_and_relse;
21002100
}
21012101
th = (const struct tcphdr *)skb->data;

0 commit comments

Comments
 (0)