Skip to content

Commit 76f5c6f

Browse files
kaberdavem330
authored andcommitted
tipc: set skb->protocol in eth_media packet transmission
The skb->protocol field is used by packet classifiers and for AF_PACKET cooked format, TIPC needs to set it properly. Fixes packet classification and ethertype of 0x0000 in cooked captures: Out 20:c9:d0:43:12:d9 ethertype Unknown (0x0000), length 56: 0x0000: 5b50 0028 0000 30d4 0100 1000 0100 1001 [P.(..0......... 0x0010: 0000 03e8 0000 0001 20c9 d043 12d9 0000 ...........C.... 0x0020: 0000 0000 0000 0000 ........ Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8aeb89f commit 76f5c6f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/tipc/eth_media.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ static int send_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr,
111111

112112
skb_reset_network_header(clone);
113113
clone->dev = dev;
114+
clone->protocol = htons(ETH_P_TIPC);
114115
dev_hard_header(clone, dev, ETH_P_TIPC, dest->value,
115116
dev->dev_addr, clone->len);
116117
dev_queue_xmit(clone);

0 commit comments

Comments
 (0)