Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58884
b: refs/heads/master
c: f3ec75f
h: refs/heads/master
v: v3
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jul 11, 2007
1 parent 339ceac commit 9b904e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: e06e7c615877026544ad7f8b309d1a3706410383
refs/heads/master: f3ec75f627c746cfe460482d38a33b06a84d038f
11 changes: 6 additions & 5 deletions trunk/net/tipc/eth_media.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* net/tipc/eth_media.c: Ethernet bearer support for TIPC
*
* Copyright (c) 2001-2006, Ericsson AB
* Copyright (c) 2005-2006, Wind River Systems
* Copyright (c) 2001-2007, Ericsson AB
* Copyright (c) 2005-2007, Wind River Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -87,6 +87,9 @@ static int send_msg(struct sk_buff *buf, struct tipc_bearer *tb_ptr,
/**
* recv_msg - handle incoming TIPC message from an Ethernet interface
*
* Accept only packets explicitly sent to this node, or broadcast packets;
* ignores packets sent using Ethernet multicast, and traffic sent to other
* nodes (which can happen if interface is running in promiscuous mode).
* Routine truncates any Ethernet padding/CRC appended to the message,
* and ensures message size matches actual length
*/
Expand All @@ -98,9 +101,7 @@ static int recv_msg(struct sk_buff *buf, struct net_device *dev,
u32 size;

if (likely(eb_ptr->bearer)) {
if (likely(!dev->promiscuity) ||
!memcmp(skb_mac_header(buf), dev->dev_addr, ETH_ALEN) ||
!memcmp(skb_mac_header(buf), dev->broadcast, ETH_ALEN)) {
if (likely(buf->pkt_type <= PACKET_BROADCAST)) {
size = msg_size((struct tipc_msg *)buf->data);
skb_trim(buf, size);
if (likely(buf->len == size)) {
Expand Down

0 comments on commit 9b904e0

Please sign in to comment.