Skip to content

Commit

Permalink
can: raw: add support for SO_MARK
Browse files Browse the repository at this point in the history
[ Upstream commit 0826e82 ]

Add support for SO_MARK to the CAN_RAW protocol. This makes it
possible to add traffic control filters based on the fwmark.

Link: https://lore.kernel.org/all/20221210113653.170346-1-mkl@pengutronix.de
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Stable-dep-of: 7f6ca95 ("net: Implement missing getsockopt(SO_TIMESTAMPING_NEW)")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
marckleinebudde authored and gregkh committed Jan 10, 2024
1 parent 633a49e commit b213036
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/can/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)

skb->dev = dev;
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
skb->tstamp = sockc.transmit_time;

skb_setup_tx_timestamp(skb, sockc.tsflags);
Expand Down

0 comments on commit b213036

Please sign in to comment.