Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41589
b: refs/heads/master
c: e41d216
h: refs/heads/master
i:
  41587: 1aeacea
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 0bf0d51 commit c242b7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae08e1f092210619fe49551aa3ed0dc0003d5880
refs/heads/master: e41d21697326a38a0a871c515db88fa310177e24
16 changes: 8 additions & 8 deletions trunk/net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ static int bnep_send_rsp(struct bnep_session *s, u8 ctrl, u16 resp)
static inline void bnep_set_default_proto_filter(struct bnep_session *s)
{
/* (IPv4, ARP) */
s->proto_filter[0].start = htons(0x0800);
s->proto_filter[0].end = htons(0x0806);
s->proto_filter[0].start = ETH_P_IP;
s->proto_filter[0].end = ETH_P_ARP;
/* (RARP, AppleTalk) */
s->proto_filter[1].start = htons(0x8035);
s->proto_filter[1].end = htons(0x80F3);
s->proto_filter[1].start = ETH_P_RARP;
s->proto_filter[1].end = ETH_P_AARP;
/* (IPX, IPv6) */
s->proto_filter[2].start = htons(0x8137);
s->proto_filter[2].end = htons(0x86DD);
s->proto_filter[2].start = ETH_P_IPX;
s->proto_filter[2].end = ETH_P_IPV6;
}
#endif

Expand All @@ -150,8 +150,8 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, u16 *data, int len)
int i;

for (i = 0; i < n; i++) {
f[i].start = get_unaligned(data++);
f[i].end = get_unaligned(data++);
f[i].start = ntohs(get_unaligned(data++));
f[i].end = ntohs(get_unaligned(data++));

BT_DBG("proto filter start %d end %d",
f[i].start, f[i].end);
Expand Down
11 changes: 6 additions & 5 deletions trunk/net/bluetooth/bnep/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,15 @@ static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s
static inline u16 bnep_net_eth_proto(struct sk_buff *skb)
{
struct ethhdr *eh = (void *) skb->data;
u16 proto = ntohs(eh->h_proto);

if (ntohs(eh->h_proto) >= 1536)
return eh->h_proto;
if (proto >= 1536)
return proto;

if (get_unaligned((u16 *) skb->data) == 0xFFFF)
return htons(ETH_P_802_3);
if (get_unaligned((__be16 *) skb->data) == htons(0xFFFF))
return ETH_P_802_3;

return htons(ETH_P_802_2);
return ETH_P_802_2;
}

static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session *s)
Expand Down

0 comments on commit c242b7c

Please sign in to comment.