From 2768761f265a148d0b43741f86069a070211cc87 Mon Sep 17 00:00:00 2001 From: samuel.chou Date: Tue, 15 Oct 2013 11:04:53 +0800 Subject: cleo/{linux/net/bridge,devkit/p1905_managerd}: not forwarding LLDP NearestLegacyBridge message, closes #4242 --- cleopatre/devkit/p1905_managerd/src/lldp_message_parse.c | 2 +- cleopatre/linux-2.6.25.10-spc300/net/bridge/br_input.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'cleopatre') diff --git a/cleopatre/devkit/p1905_managerd/src/lldp_message_parse.c b/cleopatre/devkit/p1905_managerd/src/lldp_message_parse.c index dfc8374fb6..94ae575416 100644 --- a/cleopatre/devkit/p1905_managerd/src/lldp_message_parse.c +++ b/cleopatre/devkit/p1905_managerd/src/lldp_message_parse.c @@ -27,7 +27,7 @@ //#define lldp_MESSAGE_PARSE_DEBUG #ifdef lldp_MESSAGE_PARSE_DEBUG -#define debug(...) printf(__VA_ARGS__) +#define debug(format, ...) syslog(LOG_WARNING, format, ##__VA_ARGS__) #else #define debug(...) #endif diff --git a/cleopatre/linux-2.6.25.10-spc300/net/bridge/br_input.c b/cleopatre/linux-2.6.25.10-spc300/net/bridge/br_input.c index de03bc482f..dbe482e8de 100755 --- a/cleopatre/linux-2.6.25.10-spc300/net/bridge/br_input.c +++ b/cleopatre/linux-2.6.25.10-spc300/net/bridge/br_input.c @@ -24,6 +24,7 @@ const u8 br_group_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 }; #ifdef CONFIG_IEEE1905_1_FORWARD_ENTITY const u8 br_p1905_multicast_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x13 }; +const u8 nearest_bridge_group_address[ETH_ALEN] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e }; #endif static void br_pass_frame_up(struct net_bridge *br, struct sk_buff *skb) @@ -68,15 +69,17 @@ int br_handle_frame_finish(struct sk_buff *skb) dst = NULL; #ifdef CONFIG_IEEE1905_1_FORWARD_ENTITY - if (skb->protocol == htons(ETH_P_1905)){ + if ((skb->protocol == htons(ETH_P_1905)) || (skb->protocol == htons(ETH_P_LLDP))){ /* only send to upper layer(don't forward) if 1905.1 multicast address * or local abstraction layer mac address. * According to ieee1905.1 spec, neighbor multicast CMDU and unicast * CMDU should not be forwarded. */ + /*2013.10.15, add new: not forward LLDP NearestLegacyBridge message*/ if((!compare_ether_addr(br_p1905_multicast_address,dest)) || (!compare_ether_addr(br_get_not_forward_dest(),dest)) || - ((dst = __br_fdb_get(br, dest)) && dst->is_local)){ + (!compare_ether_addr(nearest_bridge_group_address,dest))|| + ((dst = __br_fdb_get(br, dest)) && dst->is_local)){ skb2 = skb; skb = NULL; } -- cgit v1.2.3