search for: bridge_id

Displaying 20 results from an estimated 24 matches for "bridge_id".

2007 Apr 18
0
[Bridge] STP Explanation
...unsigned char protocol[2]= {0x00,0x00}; // le type unsigned char peut ?tre assimil? ? un octet unsigned char version = 0x02; //convention unsigned char bpdu_type; } bpdu_header; typedef struct { bpdu_flag flags; unsigned char root_id[8]; unsigned char root_path_cost[4]; unsigned char bridge_id[8]; unsigned char port_id[2]; unsigned char message_age[2]; unsigned char max_age[2]; unsigned char hello_time[2]; unsigned char forward_delay[2]; } bpdu_body; typedef struct { bpdu_header hdr; bpdu_body body; unsigned char ver_1_len[2];// ? }bpdu; -------------------------------...
2007 Apr 18
1
[Bridge] STP Explanation (2)
...buf[20] = (bpdu->bpdu_body.root_path_cost >> 24) & 0xFF; buf[21] = (bpdu->bpdu_body.root_path_cost >> 16) & 0xFF; buf[22] = (bpdu->bpdu_body.root_path_cost >> 8) & 0xFF; buf[23] = bpdu->bpdu_body.root_path_cost & 0xFF; buf[24] = bpdu->bpdu_body.bridge_id.prio[0]; buf[25] = bpdu->bpdu_body.bridge_id.prio[1]; buf[26] = bpdu->bpdu_body.bridge_id.addr[0]; buf[27] = bpdu->bpdu_body.bridge_id.addr[1]; buf[28] = bpdu->bpdu_body.bridge_id.addr[2]; buf[29] = bpdu->bpdu_body.bridge_id.addr[3]; buf[30] = bpdu->bpdu_body.bridge_id.addr[...
2007 Apr 18
1
[Bridge] [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses
From: Evgeny Kravtsunov <emkravts@openvz.org> compare_ether_addr() implicitly requires that the addresses passed are 2-bytes aligned in memory. This is not true for br_stp_change_bridge_id() and br_stp_recalculate_bridge_id() in which one of the addresses is unsigned char *, and thus may not be 2-bytes aligned. Signed-off-by: Evgeny Kravtsunov <emkravts@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Pavel Emelianov <xemul@openvz.org> --...
2007 Apr 18
4
[Bridge] [Patch] [2.6.7] Bridge - Fix BPDU message_age
Fixes message_age field update in config BPDUs. Also checks whether the BPDU message age has exceeded bridge max age before transmitting config BPDUs. Signed-off-by: Kishore A K <KishoreAK@myw.ltindia.com> Index: linux-2.6.7/net/bridge/br_stp.c ============================================================= --- linux-2.6.7/net/bridge/br_stp.c.orig 2004-06-17 20:17:27.000000000 +0530 +++
2007 Nov 22
1
[Bridge] Conflict between net/if.h and linux/if.h
...x/if.h is not define : --- libbridge.h 2007-11-22 12:16:17.000000000 +0100 +++ libbridge_modify.h 2007-11-22 12:15:58.000000000 +0100 @@ -19,7 +19,9 @@ #ifndef _LIBBRIDGE_H #define _LIBBRIDGE_H +#ifndef _LINUX_IF_H #include <net/if.h> +#endif #include <linux/if_bridge.h> struct bridge_id Do you think it's a good solution ? Doude.
2007 Apr 18
0
[Bridge] [PATCH 2.6] Fix message age in bridge STP config packets
...t is at least one. + */ +#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) + static const char *br_port_state_names[] = { [BR_STATE_DISABLED] = "disabled", [BR_STATE_LISTENING] = "listening", @@ -157,24 +162,25 @@ bpdu.root_path_cost = br->root_path_cost; bpdu.bridge_id = br->bridge_id; bpdu.port_id = p->port_id; - bpdu.message_age = 0; - if (!br_is_root_bridge(br)) { + if (br_is_root_bridge(br)) + bpdu.message_age = 0; + else { struct net_bridge_port *root = br_get_port(br, br->root_port); - bpdu.max_age = root->message_age_timer.expires -...
2007 Apr 18
1
[Bridge] [PATCH 2.4] Bridge STP message age
...scaled (1/256) + * before sending, make sure that is at least one. + */ +#define MESSAGE_AGE_INCR ((HZ < 256) ? 1 : (HZ/256)) /* called under ioctl_lock or bridge lock */ int br_is_root_bridge(struct net_bridge *br) @@ -160,24 +163,26 @@ bpdu.root_path_cost = br->root_path_cost; bpdu.bridge_id = br->bridge_id; bpdu.port_id = p->port_id; - bpdu.message_age = 0; - if (!br_is_root_bridge(br)) { + if (br_is_root_bridge(br)) + bpdu.message_age = 0; + else { struct net_bridge_port *root; - unsigned long age; root = br_get_port(br, br->root_port); - age = br_timer_get_res...
2007 Apr 18
0
[Bridge] [PATCH] (4/4) bridge forwarding table RCU
..._if.c --- a/net/bridge/br_if.c 2004-07-28 15:30:04 -07:00 +++ b/net/bridge/br_if.c 2004-07-28 15:30:04 -07:00 @@ -149,7 +149,7 @@ br->lock = SPIN_LOCK_UNLOCKED; INIT_LIST_HEAD(&br->port_list); - br->hash_lock = RW_LOCK_UNLOCKED; + br->hash_lock = SPIN_LOCK_UNLOCKED; br->bridge_id.prio[0] = 0x80; br->bridge_id.prio[1] = 0x00; diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c --- a/net/bridge/br_input.c 2004-07-28 15:30:04 -07:00 +++ b/net/bridge/br_input.c 2004-07-28 15:30:04 -07:00 @@ -83,19 +83,17 @@ goto out; } - dst = br_fdb_get(br, dest); + dst = __b...
2023 Jun 19
2
[Bridge] [PATCH net-next v2 2/3] bridge: Add a limit on learned FDB entries
...nla_total_size(sizeof(u8)) + /* IFLA_BR_MCAST_ROUTER */ nla_total_size(sizeof(u8)) + /* IFLA_BR_MCAST_SNOOPING */ @@ -1620,6 +1628,7 @@ static int br_fill_info(struct sk_buff *skb, const struct net_device *brdev) u32 stp_enabled = br->stp_enabled; u16 priority = (br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]; u8 vlan_enabled = br_vlan_enabled(br->dev); + u32 fdb_cur_learned_entries = br_fdb_get_cur_learned_entries(br); struct br_boolopt_multi bm; u64 clockval; @@ -1656,7 +1665,9 @@ static int br_fill_info(struct sk_buff *skb, const struct net_de...
2007 Apr 18
0
[Bridge] BCP code ported to pppd 2.4.2
...neg = 0; \ + } + +#define ADDCIMGMTINLINE(opt, neg) \ + if (neg) { \ + if (len >= CILEN_MGMT_INLINE) { \ + PUTCHAR(opt, ucp); \ + PUTCHAR(CILEN_MGMT_INLINE, ucp); \ + len -= CILEN_MGMT_INLINE; \ + } else \ + neg = 0; \ + } + + ADDCIBRIDGELINEID(CI_BRIDGE_IDENTIFICATION, go->neg_bridgeid, go->lan_bridge_segno); + + ADDCIBRIDGELINEID(CI_LINE_IDENTIFICATION, go->neg_lineid, go->lan_bridge_segno); + + ADDCIMACSUPPORT(CI_MAC_SUPPORT, go->neg_macsupport, go->macsupport[0]); + ADDCIMACSUPPORT(CI_MAC_SUPPORT, go->neg_macsupport...
2007 Apr 18
0
[Bridge] 2.6.12-rc4-bridge
...cly ready: bridge-csum - turn on bridge pseudo-device flags so that smart hardware does less work. Helps Xen bridge-flush - add /sys/class/net/brX/bridge/flush write only hook to flush forwarding database entries bridge-setmac - allow setting device address to force bridge_id. setting to zero forces recalculation
2007 Apr 18
7
[Bridge] (no subject)
Dear Sir, I was trying to install bridge as we are installing scps gateway in our testbed.This requires us to install the bridge. Our Linux version is 2.4.18 ~3 and we are using redhat 7.2 Please let me know which is the bridge I should install and how to configure it. Before configuring the bridge what I should check in my configuration. Thanks for your time, Sincerely Rama ===== I hear
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev,...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev,...
2009 Aug 13
0
[Bridge] [PATCH] bridge-utils: Add 'hairpin' port forwarding mode
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -73,6 +81,12 @@ static void fetch_tv(const char *dev, const char *name, __jiffies_to_tv(tv, fetch_int(dev, name)); } +/* Check if a feature is supported. */ +static int feature_supported(const char *dev, const char *feature) +{ + return !fpaccess(dev,...
2023 Jun 19
4
[Bridge] [PATCH net-next v2 0/3, iproute2-next 0/1] bridge: Add a limit on learned FDB entries
Introduce a limit on the amount of learned FDB entries on a bridge, configured by netlink with a build time default on bridge creation in the kernel config. For backwards compatibility the kernel config default is disabling the limit (0). Without any limit a malicious actor may OOM a kernel by spamming packets with changing MAC addresses on their bridge port, so allow the bridge creator to limit
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -58,7 +66,8 @@ static int fetch_int(const char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fs...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -58,7 +66,8 @@ static int fetch_int(const char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fs...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...name) return fopen(path, "r"); } +static int fpaccess(const char *dir, const char *name) +{ + char path[SYSFS_PATH_MAX]; + + snprintf(path, SYSFS_PATH_MAX, "%s/%s", dir, name); + return access(path, F_OK); +} + static void fetch_id(const char *dev, const char *name, struct bridge_id *id) { FILE *f = fpopen(dev, name); @@ -58,7 +66,8 @@ static int fetch_int(const char *dev, const char *name) int value = -1; if (!f) - fprintf(stderr, "%s: %s\n", dev, strerror(errno)); + fprintf(stderr, "%s/%s: %s\n", dev, name, + strerror(errno)); else { fs...
2009 Jun 15
1
[Bridge] [PATCH][RFC] net/bridge: add basic VEPA support
...r; struct kobject kobj; struct rcu_head rcu; + + unsigned long flags; +#define BR_HAIRPIN_MODE 0x00000001 }; struct net_bridge @@ -98,6 +101,7 @@ struct net_bridge #endif unsigned long flags; #define BR_SET_MAC_ADDR 0x00000001 +#define BR_VEPA_MODE 0x00000010 /* STP */ bridge_id designated_root; @@ -128,6 +132,9 @@ struct net_bridge struct timer_list topology_change_timer; struct timer_list gc_timer; struct kobject *ifobj; + + /* VEPA */ + struct net_bridge_port *uplink; }; extern struct notifier_block br_device_notifier; @@ -165,6 +172,9 @@ extern int br_...