tun: Update classid on packet injection

This patch makes tun update its socket classid every time we
inject a packet into the network stack. This is so that any
updates made by the admin to the process writing packets to
tun is effected.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Herbert Xu and committed by David S. Miller 82862742 f8451725

+3
+2
drivers/net/tun.c
··· 526 526 struct sk_buff *skb; 527 527 int err; 528 528 529 + sock_update_classid(sk); 530 + 529 531 /* Under a page? Don't bother with paged skb. */ 530 532 if (prepad + len < PAGE_SIZE || !linear) 531 533 linear = len;
+1
net/core/sock.c
··· 1064 1064 if (classid && classid != sk->sk_classid) 1065 1065 sk->sk_classid = classid; 1066 1066 } 1067 + EXPORT_SYMBOL(sock_update_classid); 1067 1068 #endif 1068 1069 1069 1070 /**