mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
pkt_sched: ingress socket filter by mark
Allow bpf to set a filter to drop packets that dont match a specific mark Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7c734359d3
commit
7e75f93eda
2 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,8 @@ struct sock_fprog /* Required for SO_ATTACH_FILTER. */
|
|||
#define SKF_AD_IFINDEX 8
|
||||
#define SKF_AD_NLATTR 12
|
||||
#define SKF_AD_NLATTR_NEST 16
|
||||
#define SKF_AD_MAX 20
|
||||
#define SKF_AD_MARK 20
|
||||
#define SKF_AD_MAX 24
|
||||
#define SKF_NET_OFF (-0x100000)
|
||||
#define SKF_LL_OFF (-0x200000)
|
||||
|
||||
|
|
|
@ -303,6 +303,9 @@ load_b:
|
|||
case SKF_AD_IFINDEX:
|
||||
A = skb->dev->ifindex;
|
||||
continue;
|
||||
case SKF_AD_MARK:
|
||||
A = skb->mark;
|
||||
continue;
|
||||
case SKF_AD_NLATTR: {
|
||||
struct nlattr *nla;
|
||||
|
||||
|
|
Loading…
Reference in a new issue