Willem de Bruijn c6af0c227a ip: support SO_MARK cmsg
Enable setting skb->mark for UDP and RAW sockets using cmsg.

This is analogous to existing support for TOS, TTL, txtime, etc.

Packet sockets already support this as of commit c7d39e32632e
("packet: support per-packet fwmark for af_packet sendmsg").

Similar to other fields, implement by
1. initialize the sockcm_cookie.mark from socket option sk_mark
2. optionally overwrite this in ip_cmsg_send/ip6_datagram_send_ctl
3. initialize inet_cork.mark from sockcm_cookie.mark
4. initialize each (usually just one) skb->mark from inet_cork.mark

Step 1 is handled in one location for most protocols by ipcm_init_sk
as of commit 351782067b6b ("ipv4: ipcm_cookie initializers").

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-09-13 21:44:19 +02:00
..
2019-01-23 11:18:00 -08:00
2019-04-19 14:07:40 -07:00
2019-08-27 20:17:27 -07:00
2019-09-13 21:44:19 +02:00
2019-09-13 21:44:19 +02:00
2018-09-13 09:04:58 -07:00
2018-09-25 20:17:35 -07:00
2018-05-16 07:23:35 +02:00
2019-04-22 21:47:25 -07:00
2019-06-19 11:23:13 -04:00
2019-06-19 11:23:13 -04:00