net: sock: add sock_set_mark
This patch adds a new socket helper function to set the mark value for a kernel socket. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:

committed by
David Teigland

parent
0ffddafc3a
commit
84d1c61740
@@ -828,6 +828,14 @@ void sock_set_rcvbuf(struct sock *sk, int val)
|
||||
}
|
||||
EXPORT_SYMBOL(sock_set_rcvbuf);
|
||||
|
||||
void sock_set_mark(struct sock *sk, u32 val)
|
||||
{
|
||||
lock_sock(sk);
|
||||
sk->sk_mark = val;
|
||||
release_sock(sk);
|
||||
}
|
||||
EXPORT_SYMBOL(sock_set_mark);
|
||||
|
||||
/*
|
||||
* This is meant for all protocols to use and covers goings on
|
||||
* at the socket level. Everything here is generic.
|
||||
|
Reference in New Issue
Block a user