On Thu, Jan 17, 2019 at 4:10 AM Maxim Mikityanskiy wrote:
>
> > > > +static void packet_parse_headers(struct sk_buff *skb, struct socket
> > *sock)
> > > > +{
> > > > + if (!skb->protocol && sock->type == SOCK_RAW) {
> > > > + skb_reset_mac_header(skb);
> > > > +
> > > +static void packet_parse_headers(struct sk_buff *skb, struct socket
> *sock)
> > > +{
> > > + if (!skb->protocol && sock->type == SOCK_RAW) {
> > > + skb_reset_mac_header(skb);
> > > + skb->protocol = dev_parse_header_protocol(skb);
> > > + }
> > > +
>
On Mon, Jan 14, 2019 at 11:52 AM Willem de Bruijn
wrote:
>
> On Mon, Jan 14, 2019 at 8:20 AM Maxim Mikityanskiy
> wrote:
> >
> > If a socket was created with socket(AF_PACKET, SOCK_RAW, 0), the
> > protocol number is unavailable. Try to ask the driver to extract it from
> > the L2 header in orde
On Mon, Jan 14, 2019 at 8:20 AM Maxim Mikityanskiy wrote:
>
> If a socket was created with socket(AF_PACKET, SOCK_RAW, 0), the
> protocol number is unavailable. Try to ask the driver to extract it from
> the L2 header in order for skb_try_probe_transport_header to succeed.
>
> Signed-off-by: Maxim