diff options
Diffstat (limited to 'net/sched/cls_flow.c')
-rw-r--r-- | net/sched/cls_flow.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index b4359924846c..76bc3a20ffdb 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -68,15 +68,21 @@ static inline u32 addr_fold(void *addr) | |||
68 | 68 | ||
69 | static u32 flow_get_src(const struct sk_buff *skb, const struct flow_keys *flow) | 69 | static u32 flow_get_src(const struct sk_buff *skb, const struct flow_keys *flow) |
70 | { | 70 | { |
71 | if (flow->addrs.src) | 71 | __be32 src = flow_get_u32_src(flow); |
72 | return ntohl(flow->addrs.src); | 72 | |
73 | if (src) | ||
74 | return ntohl(src); | ||
75 | |||
73 | return addr_fold(skb->sk); | 76 | return addr_fold(skb->sk); |
74 | } | 77 | } |
75 | 78 | ||
76 | static u32 flow_get_dst(const struct sk_buff *skb, const struct flow_keys *flow) | 79 | static u32 flow_get_dst(const struct sk_buff *skb, const struct flow_keys *flow) |
77 | { | 80 | { |
78 | if (flow->addrs.dst) | 81 | __be32 dst = flow_get_u32_dst(flow); |
79 | return ntohl(flow->addrs.dst); | 82 | |
83 | if (dst) | ||
84 | return ntohl(dst); | ||
85 | |||
80 | return addr_fold(skb_dst(skb)) ^ (__force u16) tc_skb_protocol(skb); | 86 | return addr_fold(skb_dst(skb)) ^ (__force u16) tc_skb_protocol(skb); |
81 | } | 87 | } |
82 | 88 | ||