br_input.c (cf0f02d04a830c8202e6a8f8bb37acc6c1629a91) br_input.c (fda93d92d7824159d8532995072dde2bee4bc4b3)
1/*
2 * Handle incoming frames
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 *
8 * $Id: br_input.c,v 1.10 2001/12/24 04:50:20 davem Exp $

--- 5 unchanged lines hidden (view full) ---

14 */
15
16#include <linux/kernel.h>
17#include <linux/netdevice.h>
18#include <linux/etherdevice.h>
19#include <linux/netfilter_bridge.h>
20#include "br_private.h"
21
1/*
2 * Handle incoming frames
3 * Linux ethernet bridge
4 *
5 * Authors:
6 * Lennert Buytenhek <buytenh@gnu.org>
7 *
8 * $Id: br_input.c,v 1.10 2001/12/24 04:50:20 davem Exp $

--- 5 unchanged lines hidden (view full) ---

14 */
15
16#include <linux/kernel.h>
17#include <linux/netdevice.h>
18#include <linux/etherdevice.h>
19#include <linux/netfilter_bridge.h>
20#include "br_private.h"
21
22const unsigned char bridge_ula[6] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
22/* Bridge group multicast address 802.1d (pg 51). */
23const u8 br_group_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
23
24static void br_pass_frame_up(struct net_bridge *br, struct sk_buff *skb)
25{
26 struct net_device *indev;
27
28 br->statistics.rx_packets++;
29 br->statistics.rx_bytes += skb->len;
30

--- 72 unchanged lines hidden (view full) ---

103 br_fdb_update(p->br, p, eth_hdr(skb)->h_source);
104
105 return 0; /* process further */
106}
107
108/* Does address match the link local multicast address.
109 * 01:80:c2:00:00:0X
110 */
24
25static void br_pass_frame_up(struct net_bridge *br, struct sk_buff *skb)
26{
27 struct net_device *indev;
28
29 br->statistics.rx_packets++;
30 br->statistics.rx_bytes += skb->len;
31

--- 72 unchanged lines hidden (view full) ---

104 br_fdb_update(p->br, p, eth_hdr(skb)->h_source);
105
106 return 0; /* process further */
107}
108
109/* Does address match the link local multicast address.
110 * 01:80:c2:00:00:0X
111 */
111static inline int is_link_local(const unsigned char *dest)
112static inline int is_link_local(const const unsigned char *dest)
112{
113{
113 return memcmp(dest, bridge_ula, 5) == 0 && (dest[5] & 0xf0) == 0;
114 return memcmp(dest, br_group_address, 5) == 0 && (dest[5] & 0xf0) == 0;
114}
115
116/*
117 * Called via br_handle_frame_hook.
118 * Return 0 if *pskb should be processed furthur
119 * 1 if *pskb is handled
120 * note: already called with rcu_read_lock (preempt_disabled)
121 */

--- 37 unchanged lines hidden ---
115}
116
117/*
118 * Called via br_handle_frame_hook.
119 * Return 0 if *pskb should be processed furthur
120 * 1 if *pskb is handled
121 * note: already called with rcu_read_lock (preempt_disabled)
122 */

--- 37 unchanged lines hidden ---