From: Eric Dumazet Date: Thu, 1 Oct 2009 19:14:46 +0000 (+0000) Subject: Use sk_mark for routing lookup in more places X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d37a186cedc51502dbee71c16ae0fbd9114d62c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Use sk_mark for routing lookup in more places Here is a followup on this area, thanks. [RFC] af_packet: fill skb->mark at xmit skb->mark may be used by classifiers, so fill it in case user set a SO_MARK option on socket. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index d398a9bf6903..efc1174af716 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -490,6 +490,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, skb->protocol = proto; skb->dev = dev; skb->priority = sk->sk_priority; + skb->mark = sk->sk_mark; if (err) goto out_free; @@ -884,6 +885,7 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb, skb->protocol = proto; skb->dev = dev; skb->priority = po->sk.sk_priority; + skb->mark = po->sk.sk_mark; skb_shinfo(skb)->destructor_arg = ph.raw; switch (po->tp_version) { @@ -1153,6 +1155,7 @@ static int packet_snd(struct socket *sock, skb->protocol = proto; skb->dev = dev; skb->priority = sk->sk_priority; + skb->mark = sk->sk_mark; /* * Now send it