ath79: etactica-eg200: fix restore button
[openwrt/openwrt.git] / target / linux / generic / pending-4.14 / 630-packet_socket_type.patch
index e1736214f5e63a6afaed64c6e85ae9752f5b5c81..8dbe06023e3b2351e4ca656dcb3535f9b52202a8 100644 (file)
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        if (!net_eq(dev_net(dev), sock_net(sk)))
                goto drop;
  
-@@ -3262,6 +3264,7 @@ static int packet_create(struct net *net
+@@ -3294,6 +3296,7 @@ static int packet_create(struct net *net
        mutex_init(&po->pg_vec_lock);
        po->rollover = NULL;
        po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        if (sock->type == SOCK_PACKET)
                po->prot_hook.func = packet_rcv_spkt;
-@@ -3875,6 +3878,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3907,6 +3910,16 @@ packet_setsockopt(struct socket *sock, i
                po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
                return 0;
        }
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        default:
                return -ENOPROTOOPT;
        }
-@@ -3927,6 +3940,13 @@ static int packet_getsockopt(struct sock
+@@ -3959,6 +3972,13 @@ static int packet_getsockopt(struct sock
        case PACKET_VNET_HDR:
                val = po->has_vnet_hdr;
                break;
@@ -128,7 +128,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                break;
 --- a/net/packet/internal.h
 +++ b/net/packet/internal.h
-@@ -131,6 +131,7 @@ struct packet_sock {
+@@ -132,6 +132,7 @@ struct packet_sock {
        struct net_device __rcu *cached_dev;
        int                     (*xmit)(struct sk_buff *skb);
        struct packet_type      prot_hook ____cacheline_aligned_in_smp;