diff options
author | David S. Miller <davem@davemloft.net> | 2014-06-05 16:22:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-05 16:22:02 -0700 |
commit | f666f87b9423fb534d2116206ace04495080f2b5 (patch) | |
tree | 23f929c890219d6ef412b4ff630adf501b70a3ec /net | |
parent | 46cfd6ea23b0a207c87269d86457727dc4485708 (diff) | |
parent | 0dcceabb0c1bf2d4c12a748df9933fad303072a7 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/xen-netback/netback.c
net/core/filter.c
A filter bug fix overlapped some cleanups and a conversion
over to some new insn generation macros.
A xen-netback bug fix overlapped the addition of multi-queue
support.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 8 | ||||
-rw-r--r-- | net/ipv6/udp.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 9de0c25323b4..6bd2e350e751 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -584,7 +584,11 @@ load_byte: * to make sure its still a 3bit field starting at a byte boundary; * taken from arch/x86/net/bpf_jit_comp.c. */ +#ifdef __BIG_ENDIAN_BITFIELD +#define PKT_TYPE_MAX (7 << 5) +#else #define PKT_TYPE_MAX 7 +#endif static unsigned int pkt_type_offset(void) { struct sk_buff skb_probe = { .pkt_type = ~0, }; @@ -685,6 +689,10 @@ static bool convert_bpf_extensions(struct sock_filter *fp, return false; insn++; *insn = BPF_ALU32_IMM(BPF_AND, BPF_REG_A, PKT_TYPE_MAX); +#ifdef __BIG_ENDIAN_BITFIELD + insn++; + *insn = BPF_ALU32_IMM(BPF_RSH, BPF_REG_A, 5); +#endif break; case SKF_AD_OFF + SKF_AD_IFINDEX: diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 60325236446a..4180f54a948e 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -720,15 +720,15 @@ static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk, if (inet->inet_dport != rmt_port) continue; } - if (!ipv6_addr_any(&sk->sk_v6_daddr) && - !ipv6_addr_equal(&sk->sk_v6_daddr, rmt_addr)) + if (!ipv6_addr_any(&s->sk_v6_daddr) && + !ipv6_addr_equal(&s->sk_v6_daddr, rmt_addr)) continue; if (s->sk_bound_dev_if && s->sk_bound_dev_if != dif) continue; - if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) { - if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, loc_addr)) + if (!ipv6_addr_any(&s->sk_v6_rcv_saddr)) { + if (!ipv6_addr_equal(&s->sk_v6_rcv_saddr, loc_addr)) continue; } if (!inet6_mc_check(s, loc_addr, rmt_addr)) |