flow_keys: include thoff into flow_keys for later usage

In skb_flow_dissect(), we perform a dissection of a skbuff. Since we're
doing the work here anyway, also store thoff for a later usage, e.g. in
the BPF filter.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniel Borkmann 2013-03-19 06:39:29 +00:00 коммит произвёл David S. Miller
Родитель e0ebcb80cb
Коммит 8ed781668d
2 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -9,6 +9,7 @@ struct flow_keys {
__be32 ports;
__be16 port16[2];
};
u16 thoff;
u8 ip_proto;
};

Просмотреть файл

@ -140,6 +140,8 @@ ipv6:
flow->ports = *ports;
}
flow->thoff = (u16) nhoff;
return true;
}
EXPORT_SYMBOL(skb_flow_dissect);